mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-01-08 17:59:56 +01:00
Win32: Made the message processing more friendly to potential foreign windows created on the same thread (and thus sharing message queue with LWJGL). Now handleMessages() in Display.c only processes messages for the current lwjgl window.
This commit is contained in:
parent
2bc1b89772
commit
cc028c9c2e
|
|
@ -238,25 +238,25 @@ static LRESULT CALLBACK lwjglWindowProc(HWND hWnd,
|
|||
/*
|
||||
* Handle native Win32 messages
|
||||
*/
|
||||
static void handleMessages(void)
|
||||
{
|
||||
static void handleMessages(void) {
|
||||
/*
|
||||
* 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
|
||||
NULL, // handle to window
|
||||
0, // first message
|
||||
0, // last message
|
||||
PM_REMOVE // removal options
|
||||
))
|
||||
{
|
||||
if (display_hwnd != NULL && msg.hwnd == display_hwnd)
|
||||
DispatchMessage(&msg);
|
||||
};
|
||||
if (display_hwnd != NULL) {
|
||||
while (PeekMessage(
|
||||
&msg, // message information
|
||||
display_hwnd, // handle to window
|
||||
0, // first message
|
||||
0, // last message
|
||||
PM_REMOVE // removal options
|
||||
))
|
||||
{
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue