Commit f4db8eca authored by John van Groningen's avatar John van Groningen

don't accept messages for windows (use INVALID_HANDLE_VALUE instead

of NULL), and wait for a POSTMESSAGE
parent dc272d8c
......@@ -68,12 +68,14 @@ int get_integers_from_message (int wm_number,int *i1_p,int *i2_p)
return r;
}
#define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
int get_integers_from_thread_message (int wm_number,int thread_handle,int *i1_p,int *i2_p)
{
MSG message;
int r;
r=PeekMessage (&message,NULL,wm_number,wm_number,PM_NOREMOVE);
r=PeekMessage (&message,INVALID_HANDLE_VALUE,wm_number,wm_number,PM_NOREMOVE | (QS_POSTMESSAGE<<16));
while (r==0){
r=MsgWaitForMultipleObjects (1,&thread_handle,0,INFINITE,QS_POSTMESSAGE);
......@@ -83,10 +85,10 @@ int get_integers_from_thread_message (int wm_number,int thread_handle,int *i1_p,
return 0;
}
r=PeekMessage (&message,NULL,wm_number,wm_number,PM_NOREMOVE);
r=PeekMessage (&message,INVALID_HANDLE_VALUE,wm_number,wm_number,PM_NOREMOVE | (QS_POSTMESSAGE<<16));
}
r=GetMessage (&message,NULL,wm_number,wm_number);
r=GetMessage (&message,INVALID_HANDLE_VALUE,wm_number,wm_number);
if (r!=0){
*i1_p=message.wParam;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment