mirror of https://github.com/RPCS3/rpcs3.git
RSX : add rescale support for native 960x1080 & 1024x768
This commit is contained in:
parent
bbf3c80d04
commit
38e41e0ea8
|
@ -1373,7 +1373,7 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
||||||
{
|
{
|
||||||
switch (Ini.GSResolution.GetValue())
|
switch (Ini.GSResolution.GetValue())
|
||||||
{
|
{
|
||||||
case 1:// 1920x1080 window size
|
case 1: // 1920x1080 window size
|
||||||
m_width_scale = m_height_scale = 4.0f;
|
m_width_scale = m_height_scale = 4.0f;
|
||||||
m_width = 1980;
|
m_width = 1980;
|
||||||
m_height = 1080;
|
m_height = 1080;
|
||||||
|
@ -1391,6 +1391,58 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, mem32_ptr_t& args, const u3
|
||||||
break;
|
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;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -231,9 +231,6 @@ static const CellVideoOutResolution ResolutionTable[] =
|
||||||
{1600, 1080}, //10 - 5
|
{1600, 1080}, //10 - 5
|
||||||
{1440, 1080}, //11 - 6
|
{1440, 1080}, //11 - 6
|
||||||
{1280, 1080}, //12 - 7
|
{1280, 1080}, //12 - 7
|
||||||
{960, 1080}, //13 - 8
|
|
||||||
{960, 540}, //14 - 9 (Terraria [BLES01938])
|
|
||||||
{1024,768}, //15 - 10 (Eskiss Homebrew)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline static u32 ResolutionIdToNum(u32 id)
|
inline static u32 ResolutionIdToNum(u32 id)
|
||||||
|
@ -253,30 +250,24 @@ inline static u32 ResolutionIdToNum(u32 id)
|
||||||
5, //10
|
5, //10
|
||||||
6, //11
|
6, //11
|
||||||
7, //12
|
7, //12
|
||||||
8, //13
|
|
||||||
9, //14
|
|
||||||
10, //15
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return id <= 15 ? res[id] : 0;
|
return id <= 12 ? res[id] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static u32 ResolutionNumToId(u32 num)
|
inline static u32 ResolutionNumToId(u32 num)
|
||||||
{
|
{
|
||||||
static const u32 res[] =
|
static const u32 res[] =
|
||||||
{
|
{
|
||||||
0,
|
0, //0
|
||||||
1,
|
1, //1
|
||||||
2,
|
2, //2
|
||||||
4,
|
4, //3
|
||||||
5,
|
5, //4
|
||||||
10,
|
10, //5
|
||||||
11,
|
11, //6
|
||||||
12,
|
12, //7
|
||||||
13,
|
|
||||||
14,
|
|
||||||
15,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return num <= 10 ? res[num] : 0;
|
return num <= 7 ? res[num] : 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue