osd/windows/window.cpp: Allow BGFX to bounce cleanly when toggling fullscreen on Windows with multiple output screens/windows.

This commit is contained in:
Vas Crabb 2023-02-02 03:41:15 +11:00
parent f408dd83e2
commit 3a7971b93f
1 changed files with 4 additions and 0 deletions

View File

@ -524,6 +524,10 @@ void winwindow_toggle_full_screen()
// toggle the window mode
video_config.windowed = !video_config.windowed;
// 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();
// iterate over windows and toggle their fullscreen state
for (const auto &window : osd_common_t::window_list())
{