mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03: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
@ -26,6 +26,7 @@
|
|||||||
#include "debugwin.h"
|
#include "debugwin.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
|
#include "input.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "strconv.h"
|
#include "strconv.h"
|
||||||
#include "winutf8.h"
|
#include "winutf8.h"
|
||||||
@ -266,6 +267,9 @@ void osd_wait_for_debugger(void)
|
|||||||
waiting_for_debugger = TRUE;
|
waiting_for_debugger = TRUE;
|
||||||
smart_show_all(TRUE);
|
smart_show_all(TRUE);
|
||||||
|
|
||||||
|
// run input polling to ensure that our status is in sync
|
||||||
|
wininput_poll();
|
||||||
|
|
||||||
// get and process messages
|
// get and process messages
|
||||||
GetMessage(&message, NULL, 0, 0);
|
GetMessage(&message, NULL, 0, 0);
|
||||||
last_debugger_update = GetTickCount();
|
last_debugger_update = GetTickCount();
|
||||||
|
@ -533,22 +533,22 @@ static void wininput_exit(running_machine *machine)
|
|||||||
|
|
||||||
void wininput_poll(void)
|
void wininput_poll(void)
|
||||||
{
|
{
|
||||||
int hasfocus = winwindow_has_focus();
|
int hasfocus = winwindow_has_focus() && input_enabled;
|
||||||
|
|
||||||
// ignore if not enabled
|
// ignore if not enabled
|
||||||
if (!input_enabled)
|
if (input_enabled)
|
||||||
return;
|
{
|
||||||
|
// remember when this happened
|
||||||
|
last_poll = GetTickCount();
|
||||||
|
|
||||||
// remember when this happened
|
// periodically process events, in case they're not coming through
|
||||||
last_poll = GetTickCount();
|
// 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
|
// track if mouse/lightgun is enabled, for mouse hiding purposes
|
||||||
// this also will make sure the mouse state is up-to-date
|
mouse_enabled = input_device_class_enabled(DEVICE_CLASS_MOUSE);
|
||||||
winwindow_process_events_periodic();
|
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
|
// poll all of the devices
|
||||||
if (hasfocus)
|
if (hasfocus)
|
||||||
|
Loading…
Reference in New Issue
Block a user