Skip to content

Commit

Permalink
rbpi: fix pixel ratio setup for rbpi
Browse files Browse the repository at this point in the history
  • Loading branch information
elupus committed Aug 1, 2013
1 parent a54b5c9 commit 72f73e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,19 @@ 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);
// Also add 3D flags
if (tv_state.display.hdmi.format_3d == HDMI_3D_FORMAT_SBS_HALF)
{
m_desktopRes.dwFlags |= D3DPRESENTFLAG_MODE3DSBS;
m_desktopRes.fPixelRatio *= 2.0;
}
else if (tv_state.display.hdmi.format_3d == HDMI_3D_FORMAT_TB_HALF)
{
m_desktopRes.dwFlags |= D3DPRESENTFLAG_MODE3DTB;
m_desktopRes.fPixelRatio *= 0.5;
}
m_desktopRes.fRefreshRate = (float)tv_state.display.hdmi.frame_rate;
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);
}
else // sdtv
{
Expand Down

0 comments on commit 72f73e1

Please sign in to comment.