summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2015-01-11 13:43:02 +1100
committerskidau <skidau@gmail.com>2015-01-11 13:43:02 +1100
commita36fe1dd1da487bbe9adce06aea8476cb08de4f7 (patch)
treefd13414319e79e5eff5c31d675faa78038626556 /Source/Core
parent33047c953682057621797caf4bff8d2730668b58 (diff)
parent917f6683f41af75cec4b4db137a8f36fe09e2ddb (diff)
Merge pull request #1850 from adamdmoss/vidmodep
Video: Distinguish between interlace and non-interlace X11 XRANDR modes
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/X11Utils.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp
index 03973b1aba..c571735eb1 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,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())
{