Windows: Make sure the DirectInput even buffer is properly flushed before switching to grabbed state.
This commit is contained in:
parent
d7542e3a71
commit
72c0fc81b8
|
@ -393,6 +393,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_grabMouse
|
|||
HRESULT di_res;
|
||||
if(grab) {
|
||||
if (!mouse_grabbed) {
|
||||
// flush DX event buffer
|
||||
readDXBuffer(env);
|
||||
mouse_grabbed = true;
|
||||
IDirectInputDevice_Unacquire(mDIDevice);
|
||||
if (!acquireMouse(DISCL_EXCLUSIVE | DISCL_FOREGROUND))
|
||||
|
|
Loading…
Reference in New Issue