Advertisement

DirectInput lost ...

Started by April 27, 2003 11:23 AM
1 comment, last by penetrator 21 years, 10 months ago
When i switch from my opengl app to another one (just with ALT-TAB), when i get back i lose joystick input. I''m using directx7.0, calling the following functions in the Winmain() g_pJoystick->Poll(); HRESULT hr2 = g_pJoystick->GetDeviceState(sizeof(DIJOYSTATE), &js );
not entirely sure coz i only read up on DirectInput yesterday... but it may have something to do with th acquire/unaquire functions. when an application loses focus, the input would be unacquired (though whether this is automatic, i have yet to figure out). if that happens, u need to reacquire it. check the docs that came with the directx sdk. shud be there somewhere.
- To learn, we share... Give some to take some -
Advertisement
quote:
Original post by penetrator
When i switch from my opengl app to another one (just with ALT-TAB), when i get back i lose joystick input. I''m using directx7.0, calling the following functions in the Winmain()

g_pJoystick->Poll();
HRESULT hr2 = g_pJoystick->GetDeviceState(sizeof(DIJOYSTATE), &js );




Afaik it is something like Restore() or Reaquire() or so...
_____________________________________http://www.winmaze.de, a 3D shoot em up in OpenGL, nice graphics, multiplayer, chat rooms, a nice community, worth visiting! ;)http://www.spheretris.tk, an upcoming Tetrisphere clone for windows, a 3D tetris game on a sphere with powerful graphics for Geforce FX and similar graphics cards.

This topic is closed to new replies.

Advertisement