diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2020-12-16 23:31:53 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2020-12-16 23:31:53 -0500 |
commit | 7d84852db673849427ddca37d8e5b91a6078ee7c (patch) | |
tree | 290be8f9c39806e58b4b2cac4b645dd1a6cc8cfc /src/osd/windows | |
parent | f8edcb7c2ef6a6ae0db045c9886a49468d08d4aa (diff) |
Remove keepaspect and fullstretch members of osd_video_config
Diffstat (limited to 'src/osd/windows')
-rw-r--r-- | src/osd/windows/video.cpp | 1 | ||||
-rw-r--r-- | src/osd/windows/window.cpp | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp index c6f4d3a0a89..c277e4a0c3c 100644 --- a/src/osd/windows/video.cpp +++ b/src/osd/windows/video.cpp @@ -150,7 +150,6 @@ void windows_osd_interface::extract_video_config() video_config.windowed = options().window(); video_config.prescale = options().prescale(); video_config.filter = options().filter(); - video_config.keepaspect = options().keep_aspect(); video_config.numscreens = options().numscreens(); // if we are in debug mode, never go full screen diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp index 5027455dfb6..7e7af0aa5ed 100644 --- a/src/osd/windows/window.cpp +++ b/src/osd/windows/window.cpp @@ -850,6 +850,7 @@ void win_window_info::destroy() // free the render target machine().render().target_free(m_target); + m_target = nullptr; } @@ -1308,7 +1309,7 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR case WM_SIZING: { RECT *rect = (RECT *)lparam; - if (video_config.keepaspect && !(GetAsyncKeyState(VK_CONTROL) & 0x8000)) + if (keepaspect() && !(GetAsyncKeyState(VK_CONTROL) & 0x8000)) { osd_rect r = window->constrain_to_aspect_ratio(RECT_to_osd_rect(*rect), wparam); rect->top = r.top(); @@ -1681,8 +1682,9 @@ void win_window_info::update_minmax_state() RECT bounds; // compare the maximum bounds versus the current bounds - osd_dim minbounds = get_min_bounds(video_config.keepaspect); - osd_dim maxbounds = get_max_bounds(video_config.keepaspect); + const bool keep_aspect = keepaspect(); + osd_dim minbounds = get_min_bounds(keep_aspect); + osd_dim maxbounds = get_max_bounds(keep_aspect); GetWindowRect(platform_window(), &bounds); // if either the width or height matches, we were maximized @@ -1709,7 +1711,7 @@ void win_window_info::minimize_window() { assert(GetCurrentThreadId() == window_threadid); - osd_dim newsize = get_min_bounds(video_config.keepaspect); + osd_dim newsize = get_min_bounds(keepaspect()); // get the window rect RECT bounds; @@ -1732,7 +1734,7 @@ void win_window_info::maximize_window() { assert(GetCurrentThreadId() == window_threadid); - osd_dim newsize = get_max_bounds(video_config.keepaspect); + osd_dim newsize = get_max_bounds(keepaspect()); // center within the work area osd_rect work = m_monitor->usuable_position_size(); @@ -1764,7 +1766,7 @@ void win_window_info::adjust_window_position_after_major_change() if (!fullscreen()) { // constrain the existing size to the aspect ratio - if (video_config.keepaspect) + if (keepaspect()) newrect = constrain_to_aspect_ratio(newrect, WMSZ_BOTTOMRIGHT); // restrict the window to one monitor and avoid toolbars if possible |