summaryrefslogtreecommitdiffstats
path: root/src/osd/sdl/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/sdl/window.cpp')
-rw-r--r--src/osd/sdl/window.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index 0c54d4d9e5a..d655298fa8b 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -490,8 +490,8 @@ osd_dim sdl_window_info::pick_best_mode()
m_target->compute_minimum_size(minimum_width, minimum_height);
// use those as the target for now
- target_width = minimum_width * MAX(1, prescale());
- target_height = minimum_height * MAX(1, prescale());
+ target_width = minimum_width * std::max(1, prescale());
+ target_height = minimum_height * std::max(1, prescale());
// if we're not stretching, allow some slop on the minimum since we can handle it
{
@@ -926,12 +926,12 @@ osd_rect sdl_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
m_target->compute_minimum_size(minwidth, minheight);
// clamp against the absolute minimum
- propwidth = MAX(propwidth, MIN_WINDOW_DIM);
- propheight = MAX(propheight, MIN_WINDOW_DIM);
+ propwidth = std::max(propwidth, MIN_WINDOW_DIM);
+ propheight = std::max(propheight, MIN_WINDOW_DIM);
// clamp against the minimum width and height
- propwidth = MAX(propwidth, minwidth);
- propheight = MAX(propheight, minheight);
+ propwidth = std::max(propwidth, minwidth);
+ propheight = std::max(propheight, minheight);
// clamp against the maximum (fit on one screen for full screen mode)
if (m_fullscreen)
@@ -946,14 +946,14 @@ osd_rect sdl_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
// further clamp to the maximum width/height in the window
if (m_win_config.width != 0)
- maxwidth = MIN(maxwidth, m_win_config.width + extrawidth);
+ maxwidth = std::min(maxwidth, m_win_config.width + extrawidth);
if (m_win_config.height != 0)
- maxheight = MIN(maxheight, m_win_config.height + extraheight);
+ maxheight = std::min(maxheight, m_win_config.height + extraheight);
}
// clamp to the maximum
- propwidth = MIN(propwidth, maxwidth);
- propheight = MIN(propheight, maxheight);
+ propwidth = std::min(propwidth, maxwidth);
+ propheight = std::min(propheight, maxheight);
// compute the visible area based on the proposed rectangle
m_target->compute_visible_area(propwidth, propheight, pixel_aspect, m_target->orientation(), viswidth, visheight);