Fix issue with ui aspect due to recent changes in -keepaspect

This also makes sure ui aspect ratio is computed correctly even on
rotated targets.
This commit is contained in:
Antonio Giner 2016-03-25 00:25:12 +01:00
parent e514d75da2
commit fdf97109be

View File

@ -2583,7 +2583,15 @@ float render_manager::ui_aspect(render_container *rc)
// if we have a valid pixel aspect, apply that and return // if we have a valid pixel aspect, apply that and return
if (m_ui_target->pixel_aspect() != 0.0f) if (m_ui_target->pixel_aspect() != 0.0f)
aspect /= m_ui_target->pixel_aspect(); {
float pixel_aspect = m_ui_target->pixel_aspect();
if (orient & ORIENTATION_SWAP_XY)
pixel_aspect = 1.0f / pixel_aspect;
return aspect /= pixel_aspect;
}
} else { } else {
// single screen container // single screen container