summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl/osdsdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/sdl/osdsdl.cpp')
-rw-r--r--src/osd/sdl/osdsdl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/osd/sdl/osdsdl.cpp b/src/osd/sdl/osdsdl.cpp
index 633abff3a3d..260fd74891a 100644
--- a/src/osd/sdl/osdsdl.cpp
+++ b/src/osd/sdl/osdsdl.cpp
@@ -703,6 +703,9 @@ void sdl_osd_interface::check_osd_inputs()
// check for toggling fullscreen mode
if (machine().ui_input().pressed(IPT_OSD_1))
{
+ // 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)
+ (*it)->renderer_reset();
for (auto const &curwin : osd_common_t::window_list())
dynamic_cast<sdl_window_info &>(*curwin).toggle_full_screen();
}