diff options
author | 2023-01-30 06:23:19 +1100 | |
---|---|---|
committer | 2023-02-01 04:00:44 +1100 | |
commit | 2810c9d91bfaee4d833b3c6dc03672799053f702 (patch) | |
tree | 5f56c82559cf630785dcdcced145129923223152 /src/osd/modules/debugger/debugwin.cpp | |
parent | 12e5fa39063ba0fdba6dc81a08fbb07811f2a611 (diff) |
osd: Turned video modules into actual modules, fixed various issues.
Don't ignore the return status of OSD module initialisation. Attempt to
fall back to an alternate module if the selected module fails to
initialise. Log more useful diagnostic information at verbose level.
Fixed BGFX crash on exit after toggling fullscreen. Also persist more
settings than just the selected chains across toggling fullscreen.
Turned video modules into OSD modules in the same sense as all the other
OSD modules. They now use the same selection/fallback mechanism as all
the other modules without special extra code in the OSD implementations.
Untangled some object ownership mess. Windows own renderers, OSD
objects own windows. Fixed a refrence loop that caused the first window
object to always leak.
Don't create renderer object until after underlying window has been
created. Fixed issues with order of creation/destruction when toggling
fullscreen or changing prescale in fullscreen with -switchres in SDL
builds.
Use more smart pointers in BGFX and Direct3D render modules. Most of
the code now reutrns a smart pointer when handing over ownership or a
naked pointer when retaining ownership. Fixed a few leaks and
simplified cleanup code.
Encapsulated various OSD modules better.
Diffstat (limited to 'src/osd/modules/debugger/debugwin.cpp')
-rw-r--r-- | src/osd/modules/debugger/debugwin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/debugger/debugwin.cpp b/src/osd/modules/debugger/debugwin.cpp index 756aa7a5dd8..2793452dbe6 100644 --- a/src/osd/modules/debugger/debugwin.cpp +++ b/src/osd/modules/debugger/debugwin.cpp @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugwin.c - Win32 debug window handling +// debugwin.cpp - Win32 debug window handling // //============================================================ @@ -156,7 +156,7 @@ void debugger_windows::wait_for_debugger(device_t &device, bool firststop) // set the starting position for new auxiliary windows HMONITOR const nearest_monitor = MonitorFromWindow( - std::static_pointer_cast<win_window_info>(osd_common_t::s_window_list.front())->platform_window(), + dynamic_cast<win_window_info &>(*osd_common_t::window_list().front()).platform_window(), MONITOR_DEFAULTTONEAREST); if (nearest_monitor) { @@ -321,7 +321,7 @@ void debugger_windows::show_all() void debugger_windows::hide_all() { - SetForegroundWindow(std::static_pointer_cast<win_window_info>(osd_common_t::s_window_list.front())->platform_window()); + SetForegroundWindow(dynamic_cast<win_window_info &>(*osd_common_t::window_list().front()).platform_window()); for (auto &info : m_window_list) info->hide(); } |