mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Merge pull request #1850 from adamdmoss/vidmodep
Video: Distinguish between interlace and non-interlace X11 XRANDR modes
This commit is contained in:
commit
a36fe1dd1d
@ -133,6 +133,7 @@ void XRRConfiguration::Update()
|
||||
// Get the resolution setings for fullscreen mode
|
||||
unsigned int fullWidth, fullHeight;
|
||||
char *output_name = nullptr;
|
||||
char auxFlag = '\0';
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
|
||||
std::string::npos)
|
||||
{
|
||||
@ -142,8 +143,9 @@ void XRRConfiguration::Update()
|
||||
else
|
||||
{
|
||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
||||
"%m[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
|
||||
"%m[^:]: %ux%u%c", &output_name, &fullWidth, &fullHeight, &auxFlag);
|
||||
}
|
||||
bool want_interlaced = ('i' == auxFlag);
|
||||
|
||||
for (int i = 0; i < screenResources->noutput; i++)
|
||||
{
|
||||
@ -171,7 +173,8 @@ void XRRConfiguration::Update()
|
||||
if (output_info->modes[j] == screenResources->modes[k].id)
|
||||
{
|
||||
if (fullWidth == screenResources->modes[k].width &&
|
||||
fullHeight == screenResources->modes[k].height)
|
||||
fullHeight == screenResources->modes[k].height &&
|
||||
want_interlaced == !!(screenResources->modes[k].modeFlags & RR_Interlace))
|
||||
{
|
||||
fullMode = screenResources->modes[k].id;
|
||||
if (crtcInfo->x + (int)screenResources->modes[k].width > fs_fb_width)
|
||||
@ -261,9 +264,10 @@ void XRRConfiguration::AddResolutions(std::vector<std::string>& resos)
|
||||
{
|
||||
if (output_info->modes[j] == screenResources->modes[k].id)
|
||||
{
|
||||
bool interlaced = !!(screenResources->modes[k].modeFlags & RR_Interlace);
|
||||
const std::string strRes =
|
||||
std::string(output_info->name) + ": " +
|
||||
std::string(screenResources->modes[k].name);
|
||||
std::string(screenResources->modes[k].name) + (interlaced? "i" : "");
|
||||
// Only add unique resolutions
|
||||
if (std::find(resos.begin(), resos.end(), strRes) == resos.end())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user