From ee1941769baf7c6372012e59e3dda3891a8e6947 Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Wed, 7 Jan 2015 20:20:14 +0000 Subject: [PATCH 1/3] Video: Distinguish between interlace and non-interlace X11 XRANDR modes --- Source/Core/DolphinWX/X11Utils.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp index 03973b1aba..339cd29da2 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -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,10 @@ 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); + ERROR_LOG(AUDIO, "auxflag = %c", auxFlag); } + bool want_interlaced = ('i' == auxFlag); for (int i = 0; i < screenResources->noutput; i++) { @@ -170,8 +173,14 @@ void XRRConfiguration::Update() { if (output_info->modes[j] == screenResources->modes[k].id) { + std::string modename(screenResources->modes[k].name, screenResources->modes[k].nameLength); + ERROR_LOG(AUDIO, "%dx%d: %d %08x / %s", screenResources->modes[k].width, + screenResources->modes[k].height, + screenResources->modes[k].dotClock, + screenResources->modes[k].modeFlags, modename.c_str()); 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 +270,10 @@ void XRRConfiguration::AddResolutions(std::vector& 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()) { From 5fab29df8102bbf3a487b4ae49f060f5e750a992 Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Wed, 7 Jan 2015 20:22:29 +0000 Subject: [PATCH 2/3] Video: Remove debug spew in XRANDR mode code --- Source/Core/DolphinWX/X11Utils.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp index 339cd29da2..1c7cee5d6c 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -173,11 +173,6 @@ void XRRConfiguration::Update() { if (output_info->modes[j] == screenResources->modes[k].id) { - std::string modename(screenResources->modes[k].name, screenResources->modes[k].nameLength); - ERROR_LOG(AUDIO, "%dx%d: %d %08x / %s", screenResources->modes[k].width, - screenResources->modes[k].height, - screenResources->modes[k].dotClock, - screenResources->modes[k].modeFlags, modename.c_str()); if (fullWidth == screenResources->modes[k].width && fullHeight == screenResources->modes[k].height && want_interlaced == !!(screenResources->modes[k].modeFlags & RR_Interlace)) From 917f6683f41af75cec4b4db137a8f36fe09e2ddb Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Wed, 7 Jan 2015 20:23:09 +0000 Subject: [PATCH 3/3] Video: Remove more debug spew in XRANDR mode code --- Source/Core/DolphinWX/X11Utils.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp index 1c7cee5d6c..c571735eb1 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -144,7 +144,6 @@ void XRRConfiguration::Update() { sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(), "%m[^:]: %ux%u%c", &output_name, &fullWidth, &fullHeight, &auxFlag); - ERROR_LOG(AUDIO, "auxflag = %c", auxFlag); } bool want_interlaced = ('i' == auxFlag);