From 05d46a74aafee4badb1ede54f1741329acdf5bdd Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 23 May 2023 19:18:41 -0400 Subject: osd/mac, osd/sdl: Really inhibit full screen toggle in debug mode to prevent accidental crashes --- src/osd/mac/video.cpp | 4 ++-- src/osd/sdl/osdsdl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/mac/video.cpp b/src/osd/mac/video.cpp index e5feba57f76..1dab5f5782e 100644 --- a/src/osd/mac/video.cpp +++ b/src/osd/mac/video.cpp @@ -136,8 +136,8 @@ void mac_osd_interface::input_update(bool relative_reset) void mac_osd_interface::check_osd_inputs() { - // check for toggling fullscreen mode - if (machine().ui_input().pressed(IPT_OSD_1)) + // check for toggling fullscreen mode (don't do this in debug mode) + if (machine().ui_input().pressed(IPT_OSD_1) && !(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) { // destroy the renderers first so that the render module can bounce if it depends on having a window handle for (auto it = window_list().rbegin(); window_list().rend() != it; ++it) diff --git a/src/osd/sdl/osdsdl.cpp b/src/osd/sdl/osdsdl.cpp index e02232ece1f..905096c05d8 100644 --- a/src/osd/sdl/osdsdl.cpp +++ b/src/osd/sdl/osdsdl.cpp @@ -695,8 +695,8 @@ void sdl_osd_interface::process_textinput_event(SDL_Event const &event) void sdl_osd_interface::check_osd_inputs() { - // check for toggling fullscreen mode - if (machine().ui_input().pressed(IPT_OSD_1)) + // check for toggling fullscreen mode (don't do this in debug mode) + if (machine().ui_input().pressed(IPT_OSD_1) && !(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) { // destroy the renderers first so that the render module can bounce if it depends on having a window handle for (auto it = osd_common_t::window_list().rbegin(); osd_common_t::window_list().rend() != it; ++it) -- cgit v1.2.3