RSX : add rescale support for native 960x1080 & 1024x768

This commit is contained in:
raven02 2014-07-07 18:59:32 +08:00
parent bbf3c80d04
commit 38e41e0ea8
2 changed files with 63 additions and 20 deletions

View file

@ -1373,7 +1373,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
{
switch (Ini.GSResolution.GetValue())
{
case 1:// 1920x1080 window size
case 1: // 1920x1080 window size
m_width_scale = m_height_scale = 4.0f;
m_width = 1980;
m_height = 1080;
@ -1391,6 +1391,58 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
break;
}
}
// Rescale native 960x1080 to fit 1080p/720p/480p window size
if (m_buffer_width == 960 && m_buffer_height == 1080)
{
switch (Ini.GSResolution.GetValue())
{
case 1: // 1920x1080 window size
m_width_scale = 4.0f;
m_height_scale = 2.0f;
m_width = 1980;
m_height = 1080;
break;
case 2: // 1280x720 window size
m_width_scale = 2.66f;
m_height_scale = 1.33f;
m_width = 1280;
m_height = 720;
break;
case 4: // 720x480 window size
m_width_scale = 1.5f;
m_height_scale = 0.88f;
m_width = 720;
m_height = 480;
break;
}
}
// Rescale native 1024x768 to fit 1080p/720p/480p window size
if (m_buffer_width == 1024 && m_buffer_height == 768)
{
switch (Ini.GSResolution.GetValue())
{
case 1: // 1920x1080 window size
m_width_scale = 3.75f;
m_height_scale = 2.81f;
m_width = 1980;
m_height = 1080;
break;
case 2: // 1280x720 window size
m_width_scale = 2.5f;
m_height_scale = 1.87f;
m_width = 1280;
m_height = 720;
break;
case 4: // 720x480 window size
m_width_scale = 1.4f;
m_height_scale = 1.25f;
m_width = 720;
m_height = 480;
break;
}
}
}
break;