From 0208a18b81b3ebf76491c803880970d32021aa46 Mon Sep 17 00:00:00 2001 From: freakdave <freakdave@hotmail.com> Date: Sat, 14 Jul 2012 16:16:28 +0200 Subject: [PATCH] (Xbox 1) Fixed a small bug in xdk_d3d_set_viewport which was causing scaling issues with some HDTV/PAL resolutions --- xbox1/xdk_d3d8.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/xbox1/xdk_d3d8.cpp b/xbox1/xdk_d3d8.cpp index df099146f9..7aa5448738 100644 --- a/xbox1/xdk_d3d8.cpp +++ b/xbox1/xdk_d3d8.cpp @@ -72,20 +72,11 @@ static void xdk_d3d_set_viewport(bool force_full) // Get the "video mode" d3d->video_mode = XGetVideoFlags(); - // Make sure we are actually able to using component cables - // FIXME: Note that we will also use 640x480 if the user has selected 1080i as HDTV resolution + // Set the viewport based on the current resolution int width, height; - if(XGetAVPack() == XC_AV_PACK_HDTV) - { - width = d3d->video_mode & XC_VIDEO_FLAGS_HDTV_720p ? 1280 : 640; - height = d3d->video_mode & XC_VIDEO_FLAGS_HDTV_720p ? 720 : 480; - } - else - { - width = 640; - height = 480; - } + width = d3d->d3dpp.BackBufferWidth; + height = d3d->d3dpp.BackBufferHeight; int m_viewport_x_temp, m_viewport_y_temp, m_viewport_width_temp, m_viewport_height_temp; float m_zNear, m_zFar;