diff options
author | 2016-08-23 23:25:26 +0200 | |
---|---|---|
committer | 2016-08-27 22:12:29 +0200 | |
commit | a976bc2a2ab37bd98b14a94e95307558bc1647f8 (patch) | |
tree | 92923fe42feef7c72be9e4d2f10ee254ed222a8b /src/emu/render.cpp | |
parent | b65c003cbed4442a8ba457de09d8698a8d8f5f1a (diff) |
Implement new option -unevenstretchy (complementary to -unevenstretchx)
Diffstat (limited to 'src/emu/render.cpp')
-rw-r--r-- | src/emu/render.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 39018410c2b..8346411aca2 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -935,10 +935,14 @@ render_target::render_target(render_manager &manager, const internal_layout *lay m_int_overscan = manager.machine().options().int_overscan(); m_int_scale_x = manager.machine().options().int_scale_x(); m_int_scale_y = manager.machine().options().int_scale_y(); - if (manager.machine().options().uneven_stretch() && !manager.machine().options().uneven_stretch_x()) + if (manager.machine().options().uneven_stretch_x()) + m_scale_mode = SCALE_FRACTIONAL_X; + else if (manager.machine().options().uneven_stretch_y()) + m_scale_mode = SCALE_FRACTIONAL_Y; + else if (manager.machine().options().uneven_stretch()) m_scale_mode = SCALE_FRACTIONAL; else - m_scale_mode = manager.machine().options().uneven_stretch_x() ? SCALE_FRACTIONAL_X : SCALE_INTEGER; + m_scale_mode = SCALE_INTEGER; // determine the base orientation based on options if (!manager.machine().options().rotate()) @@ -1195,6 +1199,7 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height } case SCALE_FRACTIONAL_X: + case SCALE_FRACTIONAL_Y: case SCALE_INTEGER: { // get source size and aspect @@ -1210,8 +1215,8 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height float target_aspect = (float)target_width / (float)target_height * target_pixel_aspect; // determine the scale mode for each axis - bool x_is_integer = !(target_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_X); - bool y_is_integer = !(target_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_X); + bool x_is_integer = !((target_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_X) || (target_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_Y)); + bool y_is_integer = !((target_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_X) || (target_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_Y)); // first compute scale factors to fit the screen float xscale = (float)target_width / src_width; |