diff --git a/makefile b/makefile index 3da69b80f..1d640a4d5 100644 --- a/makefile +++ b/makefile @@ -1037,7 +1037,7 @@ else OLD_GIT_VERSION := $(shell cat $(GENDIR)/git_desc 2> NUL) endif ifneq ($(IGNORE_GIT),1) -NEW_GIT_VERSION := $(shell git describe --dirty) +NEW_GIT_VERSION := $(shell git describe --dirty --always) else NEW_GIT_VERSION := unknown endif diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index c4a034529..a122ad237 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -281,18 +281,22 @@ void sdl_window_info::update_cursor_state() c=SDL_CreateCursor(data, data, 8, 8, 0, 0); SDL_SetCursor(c); #else + auto &sdlosd = downcast(machine().osd()); + + // if the pointer was freed to the OS, re-capture when the user clicks back in + // the window - do this even with the debugger enabled, otherwise the pointer + // (and all input, since polling is suspended while released) gets stuck with no + // way to recover: the recapture combo can't re-fire because the keyboard isn't + // polled, so the click is the only escape hatch + if (sdlosd.pointer_released() + && (SDL_GetMouseFocus() == platform_window()) + && (SDL_GetMouseState(nullptr, nullptr) & SDL_BUTTON(SDL_BUTTON_LEFT))) + sdlosd.recapture_pointer(); + // do not do mouse capture if the debugger's enabled to avoid // the possibility of losing control if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) { - auto &sdlosd = downcast(machine().osd()); - - // if the pointer was freed to the OS, re-capture when the user clicks back in the window - if (sdlosd.pointer_released() - && (SDL_GetMouseFocus() == platform_window()) - && (SDL_GetMouseState(nullptr, nullptr) & SDL_BUTTON(SDL_BUTTON_LEFT))) - sdlosd.recapture_pointer(); - bool should_hide_mouse = sdlosd.should_hide_mouse(); if (!fullscreen() && !should_hide_mouse) diff --git a/src/osd/sdl3/window.cpp b/src/osd/sdl3/window.cpp index 81a4090bb..72df56f92 100644 --- a/src/osd/sdl3/window.cpp +++ b/src/osd/sdl3/window.cpp @@ -280,18 +280,22 @@ void sdl_window_info::update_cursor_state() c=SDL_CreateCursor(data, data, 8, 8, 0, 0); SDL_SetCursor(c); #else + auto &sdlosd = downcast(machine().osd()); + + // if the pointer was freed to the OS, re-capture when the user clicks back in + // the window - do this even with the debugger enabled, otherwise the pointer + // (and all input, since polling is suspended while released) gets stuck with no + // way to recover: the recapture combo can't re-fire because the keyboard isn't + // polled, so the click is the only escape hatch + if (sdlosd.pointer_released() + && (SDL_GetMouseFocus() == platform_window()) + && (SDL_GetMouseState(nullptr, nullptr) & SDL_BUTTON_MASK(SDL_BUTTON_LEFT))) + sdlosd.recapture_pointer(); + // do not do mouse capture if the debugger's enabled to avoid // the possibility of losing control if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) { - auto &sdlosd = downcast(machine().osd()); - - // if the pointer was freed to the OS, re-capture when the user clicks back in the window - if (sdlosd.pointer_released() - && (SDL_GetMouseFocus() == platform_window()) - && (SDL_GetMouseState(nullptr, nullptr) & SDL_BUTTON_MASK(SDL_BUTTON_LEFT))) - sdlosd.recapture_pointer(); - bool should_hide_mouse = sdlosd.should_hide_mouse(); if (!fullscreen() && !should_hide_mouse)