diff options
author | endolf <[email protected]> | 2005-08-27 09:22:16 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2005-08-27 09:22:16 +0000 |
commit | a945df2bc159d88a971b8ab991ac7ce1d98e7b34 (patch) | |
tree | 153bc2c25590024f9da0692db676472f03c4b4c6 /plugins/DX8/src/native/input.cpp | |
parent | 757990309de55dc1316112899e61e3f40ba30635 (diff) |
Extra debug for rumblers
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@112 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/DX8/src/native/input.cpp')
-rw-r--r-- | plugins/DX8/src/native/input.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/plugins/DX8/src/native/input.cpp b/plugins/DX8/src/native/input.cpp index 1468904..441b54e 100644 --- a/plugins/DX8/src/native/input.cpp +++ b/plugins/DX8/src/native/input.cpp @@ -321,10 +321,23 @@ BOOL RegisterDummyWindow(HINSTANCE hInstance) } // Callback for finding out what effects a device supports -BOOL CALLBACK DIEnumEffectsProc(LPCDIEFFECTINFO pei, LPVOID pv) +BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, + LPVOID pvRef) { - *((GUID *)pv) = pei->guid; - return DIENUM_STOP; // one is enough + if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_CONSTANTFORCE) { + printf("Constant force "); + } else if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_RAMPFORCE){ + printf("Ramp force "); + } else if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_PERIODIC ){ + printf("Periodic force "); + } else if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_CONDITION ){ + printf("Condition force "); + } else if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_CUSTOMFORCE ){ + printf("Custom force "); + } else if(DIEFT_GETTYPE(pdei->dwEffType)==DIEFT_HARDWARE ){ + printf("Hardware force "); + } + return DIENUM_CONTINUE; // one is enough } /* @@ -670,15 +683,17 @@ BOOL CALLBACK EnumObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, HRESULT hr; GUID guidEffect; + printf("Supported effects: "); hr = lpDevice->EnumEffects( - (LPDIENUMEFFECTSCALLBACK) DIEnumEffectsProc, + (LPDIENUMEFFECTSCALLBACK) DIEnumEffectsCallback, &guidEffect, - DIEFT_PERIODIC); + DIEFT_ALL); if (FAILED(hr)) { // Note that success does not mean that any effects were found, // only that the process went smoothly. } + printf("\n"); // This application needs only one effect: Applying raw forces. DWORD rgdwAxes; |