Permalink
Browse files

egl: Treat unknown display aspect ratio as square pixel

  • Loading branch information...
popcornmix committed Sep 9, 2014
1 parent 43e61b6 commit b711b9abeaa452506679f58fe8904a7a4ee30e8d
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp
@@ -447,7 +447,7 @@ bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector<RESOLUTION_INFO> &r
m_desktopRes.iScreenWidth = tv_state.display.hdmi.width;
m_desktopRes.iScreenHeight= tv_state.display.hdmi.height;
m_desktopRes.dwFlags = MAKEFLAGS(tv_state.display.hdmi.group, tv_state.display.hdmi.mode, tv_state.display.hdmi.scan_mode);
m_desktopRes.fPixelRatio = get_display_aspect_ratio((HDMI_ASPECT_T)tv_state.display.hdmi.display_options.aspect) / ((float)m_desktopRes.iScreenWidth / (float)m_desktopRes.iScreenHeight);
m_desktopRes.fPixelRatio = tv_state.display.hdmi.display_options.aspect == 0 ? 1.0f : get_display_aspect_ratio((HDMI_ASPECT_T)tv_state.display.hdmi.display_options.aspect) / ((float)m_desktopRes.iScreenWidth / (float)m_desktopRes.iScreenHeight);
// Also add 3D flags
if (tv_state.display.hdmi.format_3d == HDMI_3D_FORMAT_SBS_HALF)
{
@@ -474,7 +474,7 @@ bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector<RESOLUTION_INFO> &r
m_desktopRes.iScreenHeight= tv_state.display.sdtv.height;
m_desktopRes.dwFlags = D3DPRESENTFLAG_INTERLACED;
m_desktopRes.fRefreshRate = (float)tv_state.display.sdtv.frame_rate;
m_desktopRes.fPixelRatio = get_display_aspect_ratio((SDTV_ASPECT_T)tv_state.display.sdtv.display_options.aspect) / ((float)m_desktopRes.iScreenWidth / (float)m_desktopRes.iScreenHeight);
m_desktopRes.fPixelRatio = tv_state.display.hdmi.display_options.aspect == 0 ? 1.0f : get_display_aspect_ratio((SDTV_ASPECT_T)tv_state.display.sdtv.display_options.aspect) / ((float)m_desktopRes.iScreenWidth / (float)m_desktopRes.iScreenHeight);
}
SetResolutionString(m_desktopRes);

0 comments on commit b711b9a

Please sign in to comment.