Capture the display before switching the display resolution so other
windows under the fullscreen one won't get resized to fit a lower fullscreen resolution. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7021 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ad71303007
commit
51eae3f41a
|
@ -1394,8 +1394,6 @@ void CConfigMain::AddResolutions()
|
||||||
kCGDisplayBitsPerPixel);
|
kCGDisplayBitsPerPixel);
|
||||||
CFNumberGetValue(ref, kCFNumberIntType, &d);
|
CFNumberGetValue(ref, kCFNumberIntType, &d);
|
||||||
|
|
||||||
if (CFDictionaryContainsKey(mode, kCGDisplayModeIsInterlaced))
|
|
||||||
continue;
|
|
||||||
if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched))
|
if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched))
|
||||||
continue;
|
continue;
|
||||||
if (d != 32)
|
if (d != 32)
|
||||||
|
|
|
@ -773,6 +773,12 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||||
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
|
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||||
m_XRRConfig->ToggleDisplayMode(bFullscreen);
|
m_XRRConfig->ToggleDisplayMode(bFullscreen);
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
if (!bFullscreen) {
|
||||||
|
CGRestorePermanentDisplayConfiguration();
|
||||||
|
CGDisplayRelease(CGMainDisplayID());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID());
|
CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID());
|
||||||
for (CFIndex i = 0; i < CFArrayGetCount(modes); i++)
|
for (CFIndex i = 0; i < CFArrayGetCount(modes); i++)
|
||||||
{
|
{
|
||||||
|
@ -792,14 +798,15 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||||
kCGDisplayBitsPerPixel);
|
kCGDisplayBitsPerPixel);
|
||||||
CFNumberGetValue(ref, kCFNumberIntType, &d);
|
CFNumberGetValue(ref, kCFNumberIntType, &d);
|
||||||
|
|
||||||
|
if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched))
|
||||||
|
continue;
|
||||||
if (w != x || h != y || d != 32)
|
if (w != x || h != y || d != 32)
|
||||||
continue;;
|
continue;;
|
||||||
|
|
||||||
if (bFullscreen)
|
CGDisplayCapture(CGMainDisplayID());
|
||||||
CGDisplaySwitchToMode(CGMainDisplayID(), mode);
|
CGDisplaySwitchToMode(CGMainDisplayID(), mode);
|
||||||
else
|
|
||||||
CGRestorePermanentDisplayConfiguration();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue