mirror of
https://github.com/mamedev/mame.git
synced 2024-09-29 17:38:18 +02:00
Fixed bug that would cause events to leak through to the game when the debugger was up.
This commit is contained in:
parent
dbb50ed634
commit
997890a56d
2 changed files with 16 additions and 12 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
if (input_enabled)
|
||||
{
|
||||
// remember when this happened
|
||||
last_poll = GetTickCount();
|
||||
|
||||
// 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)
|
||||
|
|
Loading…
Reference in a new issue