summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/sdl
diff options
context:
space:
mode:
author antonioginer <antonioginer@users.noreply.github.com>2021-07-02 12:07:21 +0200
committer GitHub <noreply@github.com>2021-07-02 20:07:21 +1000
commit5186eaaff1a10d981f75a8d49cf1096ff2159356 (patch)
tree5e70cdf145e1dcdc573b8878e3bd2117c24c7dec /src/osd/sdl
parentb59ede5db011abbb0c6df4fe4baa855883ab766e (diff)
Correctly apply -keepaspect with -unevenstretchx/y. (#8209)
* Correctly apply -keepaspect with -unevenstretchx/y. Initialize window at the correct size when -intscalex/y is used. * Get correct window size upon maximizing/minimizing with integer scaling.
Diffstat (limited to 'src/osd/sdl')
-rw-r--r--src/osd/sdl/window.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 0d15c4e4c0b..29ed4b920eb 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -904,10 +904,6 @@ osd_rect sdl_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
int32_t adjwidth, adjheight;
float pixel_aspect;
- // do not constrain aspect ratio for integer scaled views
- if (target()->scale_mode() != SCALE_FRACTIONAL)
- return rect;
-
// get the pixel aspect ratio for the target monitor
pixel_aspect = monitor()->pixel_aspect();
@@ -1029,7 +1025,7 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
minheight += wnd_extra_height();
// if we want it constrained, figure out which one is larger
- if (constrain && target()->scale_mode() == SCALE_FRACTIONAL)
+ if (constrain)
{
// first constrain with no height limit
osd_rect test1(0,0,minwidth,10000);
@@ -1103,7 +1099,7 @@ osd_dim sdl_window_info::get_max_bounds(int constrain)
maximum = maximum.resize(tempw, temph);
// constrain to fit
- if (constrain && target()->scale_mode() == SCALE_FRACTIONAL)
+ if (constrain)
maximum = constrain_to_aspect_ratio(maximum, WMSZ_BOTTOMRIGHT);
// remove extra window stuff