summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2007-12-21 17:46:00 +0000
committer Aaron Giles <aaron@aarongiles.com>2007-12-21 17:46:00 +0000
commit997890a56d8430a4dae4f522850e36fecf623ba0 (patch)
tree0793cb76265bf0a292aecf8a98f0312dbceaef4b /src
parentdbb50ed6344b025387c7a3858e4bf6c6b52aacb1 (diff)
Fixed bug that would cause events to leak through to the game when the debugger was up.
Diffstat (limited to 'src')
-rw-r--r--src/osd/windows/debugwin.c4
-rw-r--r--src/osd/windows/input.c24
2 files changed, 16 insertions, 12 deletions
diff --git a/src/osd/windows/debugwin.c b/src/osd/windows/debugwin.c
index 3a1a3c7a9f8..50b55e04b3c 100644
--- a/src/osd/windows/debugwin.c
+++ b/src/osd/windows/debugwin.c
@@ -26,6 +26,7 @@
#include "debugwin.h"
#include "window.h"
#include "video.h"
+#include "input.h"
#include "config.h"
#include "strconv.h"
#include "winutf8.h"
@@ -265,6 +266,9 @@ void osd_wait_for_debugger(void)
// make sure the debug windows are visible
waiting_for_debugger = TRUE;
smart_show_all(TRUE);
+
+ // run input polling to ensure that our status is in sync
+ wininput_poll();
// get and process messages
GetMessage(&message, NULL, 0, 0);
diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c
index 5c7dc4d8c6f..aa591d55ebd 100644
--- a/src/osd/windows/input.c
+++ b/src/osd/windows/input.c
@@ -533,22 +533,22 @@ static void wininput_exit(running_machine *machine)
void wininput_poll(void)
{
- int hasfocus = winwindow_has_focus();
+ int hasfocus = winwindow_has_focus() && input_enabled;
// ignore if not enabled
- if (!input_enabled)
- return;
-
- // remember when this happened
- last_poll = GetTickCount();
+ if (input_enabled)
+ {
+ // remember when this happened
+ last_poll = GetTickCount();
- // periodically process events, in case they're not coming through
- // this also will make sure the mouse state is up-to-date
- winwindow_process_events_periodic();
+ // periodically process events, in case they're not coming through
+ // this also will make sure the mouse state is up-to-date
+ winwindow_process_events_periodic();
- // track if mouse/lightgun is enabled, for mouse hiding purposes
- mouse_enabled = input_device_class_enabled(DEVICE_CLASS_MOUSE);
- lightgun_enabled = input_device_class_enabled(DEVICE_CLASS_LIGHTGUN);
+ // track if mouse/lightgun is enabled, for mouse hiding purposes
+ mouse_enabled = input_device_class_enabled(DEVICE_CLASS_MOUSE);
+ lightgun_enabled = input_device_class_enabled(DEVICE_CLASS_LIGHTGUN);
+ }
// poll all of the devices
if (hasfocus)