fix: moved handleMessages to its rightfull place
This commit is contained in:
parent
9a9406dc7e
commit
8cd9882280
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
#define WINDOWCLASSNAME "LWJGLWINDOW"
|
#define WINDOWCLASSNAME "LWJGLWINDOW"
|
||||||
|
|
||||||
extern void handleMessages();
|
void handleMessages();
|
||||||
extern HINSTANCE dll_handle;
|
extern HINSTANCE dll_handle;
|
||||||
|
|
||||||
// Initialise static variables
|
// Initialise static variables
|
||||||
|
@ -181,6 +181,37 @@ LRESULT CALLBACK WindowProc(HWND hWnd,
|
||||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle windowing messages sent by the operating system
|
||||||
|
*/
|
||||||
|
void handleMessages()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Now's our chance to deal with Windows messages that are
|
||||||
|
* otherwise just piling up and causing everything not to
|
||||||
|
* work properly
|
||||||
|
*/
|
||||||
|
MSG msg;
|
||||||
|
while (PeekMessage(
|
||||||
|
&msg, // message information
|
||||||
|
hwnd, // handle to window
|
||||||
|
0, // first message
|
||||||
|
0, // last message
|
||||||
|
PM_NOREMOVE // removal options
|
||||||
|
)) {
|
||||||
|
|
||||||
|
if (GetMessage (&msg, NULL, 0, 0) <= 0) {
|
||||||
|
#ifdef _DEBUG
|
||||||
|
printf("We should quit here...\n");
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessage(&msg);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets the fullscreen display mode.
|
* Sets the fullscreen display mode.
|
||||||
* Returns 1 for success and -1 for failure.
|
* Returns 1 for success and -1 for failure.
|
||||||
|
|
|
@ -46,39 +46,7 @@
|
||||||
HGLRC hglrc = NULL; // OpenGL rendering context
|
HGLRC hglrc = NULL; // OpenGL rendering context
|
||||||
extern HDC hdc;
|
extern HDC hdc;
|
||||||
extern HWND hwnd;
|
extern HWND hwnd;
|
||||||
|
extern void handleMessages();
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Handle windowing messages sent by the operating system
|
|
||||||
*/
|
|
||||||
void handleMessages()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Now's our chance to deal with Windows messages that are
|
|
||||||
* otherwise just piling up and causing everything not to
|
|
||||||
* work properly
|
|
||||||
*/
|
|
||||||
MSG msg;
|
|
||||||
while (PeekMessage(
|
|
||||||
&msg, // message information
|
|
||||||
hwnd, // handle to window
|
|
||||||
0, // first message
|
|
||||||
0, // last message
|
|
||||||
PM_NOREMOVE // removal options
|
|
||||||
)) {
|
|
||||||
|
|
||||||
if (GetMessage (&msg, NULL, 0, 0) <= 0) {
|
|
||||||
#ifdef _DEBUG
|
|
||||||
printf("We should quit here...\n");
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TranslateMessage(&msg);
|
|
||||||
DispatchMessage(&msg);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_lwjgl_opengl_BaseGL
|
* Class: org_lwjgl_opengl_BaseGL
|
||||||
|
|
Loading…
Reference in New Issue