From 4b3103ba24f30db7c519f9fac6537b56554fe0f2 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Sat, 6 Jun 2009 07:44:16 +0000 Subject: [PATCH] - 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) --- bochs/gui/win32.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bochs/gui/win32.cc b/bochs/gui/win32.cc index 67a1f75d4..72ccdaa5d 100644 --- a/bochs/gui/win32.cc +++ b/bochs/gui/win32.cc @@ -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); }