aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelias <[email protected]>2006-07-13 18:37:27 +0000
committerelias <[email protected]>2006-07-13 18:37:27 +0000
commitd3c30eca1f2bb9643587c8aac9c71966ceb5b3a1 (patch)
treebdb5334633d3706981b631846edd901494f02165
parenteb0ef574065305a8e6070fef98d6e7b4574723c9 (diff)
Windows: Handle polled devices in setDataFormat
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@152 e343933a-64c8-49c5-92b1-88f2ce3e89e8
-rw-r--r--plugins/windows/src/java/net/java/games/input/IDirectInputDevice.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/windows/src/java/net/java/games/input/IDirectInputDevice.java b/plugins/windows/src/java/net/java/games/input/IDirectInputDevice.java
index 5f05732..a788142 100644
--- a/plugins/windows/src/java/net/java/games/input/IDirectInputDevice.java
+++ b/plugins/windows/src/java/net/java/games/input/IDirectInputDevice.java
@@ -124,6 +124,7 @@ final class IDirectInputDevice {
public final static int DI_OK = 0x00000000;
public final static int DI_NOEFFECT = 0x00000001;
public final static int DI_PROPNOEFFECT = 0x00000001;
+ public final static int DI_POLLEDDEVICE = 0x00000002;
public final static int DI_DOWNLOADSKIPPED = 0x00000003;
public final static int DI_EFFECTRESTARTED = 0x00000004;
@@ -480,7 +481,7 @@ final class IDirectInputDevice {
checkReleased();
unacquire();
int res = nSetBufferSize(address, size);
- if (res != DI_OK && res != DI_PROPNOEFFECT)
+ if (res != DI_OK && res != DI_PROPNOEFFECT && res != DI_POLLEDDEVICE)
throw new IOException("Failed to set buffer size (" + Integer.toHexString(res) + ")");
queue = new DataQueue(size, DIDeviceObjectData.class);
queue.position(queue.limit());