|
From: Elias N. <eli...@us...> - 2004-11-08 12:10:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22405/src/native/win32 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Reset event queue on mouse grab Index: org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- org_lwjgl_input_Mouse.cpp 2 Nov 2004 13:15:59 -0000 1.65 +++ org_lwjgl_input_Mouse.cpp 8 Nov 2004 12:10:26 -0000 1.66 @@ -47,6 +47,8 @@ #include "org_lwjgl_opengl_Win32Display.h" #include "org_lwjgl_input_Mouse.h" +#define EVENT_SIZE 5 + extern HINSTANCE dll_handle; // Handle to the LWJGL dll static LPDIRECTINPUT lpdi = NULL; // DirectInput static LPDIRECTINPUTDEVICE mDIDevice; // DI Device instance @@ -110,7 +112,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_createMouse(JNIEnv *env, jobject self) { HRESULT hr; - initEventQueue(&event_queue, 5); + initEventQueue(&event_queue, EVENT_SIZE); last_poll_x = last_poll_y = last_event_x = last_event_y = accum_dx = accum_dy = accum_dwheel = 0; buffer_enabled = false; @@ -331,7 +333,8 @@ throwException(env, "Could not set the CooperativeLevel."); return; } - mDIDevice->Acquire(); + mDIDevice->Acquire(); + initEventQueue(&event_queue, EVENT_SIZE); } /** |