- fixed 2 critical bugs in the win32 gui

* gui deadlock if show-ips feature is enabled (SF bug #2799093)
  * gui hang after mouse buffer overflow (SF bug #2799121)
This commit is contained in:
Volker Ruppert 2009-06-06 07:44:16 +00:00
parent d5efb5c378
commit 4b3103ba24

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: win32.cc,v 1.132 2009-05-13 17:26:45 vruppert Exp $
// $Id: win32.cc,v 1.133 2009-06-06 07:44:16 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -1376,6 +1376,7 @@ void enq_mouse_event(void)
if (ms_xdelta || ms_ydelta || ms_zdelta)
{
if (((tail+1) % SCANCODE_BUFSIZE) == head) {
LeaveCriticalSection(&stInfo.mouseCS);
BX_ERROR(("enq_scancode: buffer full"));
return;
}
@ -1447,13 +1448,13 @@ void bx_win32_gui_c::handle_events(void)
DEV_kbd_gen_scancode(key_event);
}
}
LeaveCriticalSection(&stInfo.keyCS);
#if BX_SHOW_IPS
if (ipsUpdate) {
SetStatusText(1, ipsText, 1);
ipsUpdate = FALSE;
}
#endif
LeaveCriticalSection(&stInfo.keyCS);
}