diff options
| author | Soren Jorvang <soren.jorvang@gmail.com> | 2011-01-31 14:34:46 +0000 |
|---|---|---|
| committer | Soren Jorvang <soren.jorvang@gmail.com> | 2011-01-31 14:34:46 +0000 |
| commit | 51eae3f41abeea9fdbdd2ad218b568d4412f3c8f (patch) | |
| tree | 09080e6dc24a6f2435935a20ab99d35844082488 /Source/Core | |
| parent | ad71303007767bb5f536406708c316de798db024 (diff) | |
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
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Src/ConfigMain.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/FrameTools.cpp | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 431dbfa093..042e868022 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -1394,8 +1394,6 @@ void CConfigMain::AddResolutions() kCGDisplayBitsPerPixel); CFNumberGetValue(ref, kCFNumberIntType, &d); - if (CFDictionaryContainsKey(mode, kCGDisplayModeIsInterlaced)) - continue; if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched)) continue; if (d != 32) diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 8b373145a8..2acb2dab12 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -773,6 +773,12 @@ void CFrame::ToggleDisplayMode(bool bFullscreen) #elif defined(HAVE_XRANDR) && HAVE_XRANDR m_XRRConfig->ToggleDisplayMode(bFullscreen); #elif defined __APPLE__ + if (!bFullscreen) { + CGRestorePermanentDisplayConfiguration(); + CGDisplayRelease(CGMainDisplayID()); + return; + } + CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID()); for (CFIndex i = 0; i < CFArrayGetCount(modes); i++) { @@ -792,14 +798,15 @@ void CFrame::ToggleDisplayMode(bool bFullscreen) kCGDisplayBitsPerPixel); CFNumberGetValue(ref, kCFNumberIntType, &d); + if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched)) + continue; if (w != x || h != y || d != 32) continue;; - if (bFullscreen) - CGDisplaySwitchToMode(CGMainDisplayID(), mode); - else - CGRestorePermanentDisplayConfiguration(); + CGDisplayCapture(CGMainDisplayID()); + CGDisplaySwitchToMode(CGMainDisplayID(), mode); } + #endif } |
