summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/FrameTools.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2012-12-24 08:01:44 +1300
committerMatthew Parlane <parlane@gmail.com>2012-12-24 08:01:44 +1300
commiteedca572702c7416805375bd652c56af8665d167 (patch)
tree6345954eddeadd145f9c6ac2d4edc6db6a9f902a /Source/Core/DolphinWX/Src/FrameTools.cpp
parent59ec1fe180e327e3a1b194f2a762d697591272c9 (diff)
Revert "support retina display"
This reverts commit 3aa990161844.
Diffstat (limited to 'Source/Core/DolphinWX/Src/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/FrameTools.cpp90
1 files changed, 30 insertions, 60 deletions
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index 5434901032..fa326adecc 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -876,46 +876,39 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
m_XRRConfig->ToggleDisplayMode(bFullscreen);
#elif defined __APPLE__
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- NSView *view = (NSView *) m_RenderFrame->GetHandle();
- NSWindow *window = [view window];
+ if (!bFullscreen) {
+ CGRestorePermanentDisplayConfiguration();
+ CGDisplayRelease(CGMainDisplayID());
+ return;
+ }
- if (![window respondsToSelector:@selector(toggleFullScreen:)])
-#endif
+ CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID());
+ for (CFIndex i = 0; i < CFArrayGetCount(modes); i++)
{
- if (!bFullscreen) {
- CGRestorePermanentDisplayConfiguration();
- CGDisplayRelease(CGMainDisplayID());
- return;
- }
-
- CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID());
- for (CFIndex i = 0; i < CFArrayGetCount(modes); i++)
- {
- CFDictionaryRef mode;
- CFNumberRef ref;
- int x, y, w, h, d;
-
- sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.\
- strFullscreenResolution.c_str(), "%dx%d", &x, &y);
-
- mode = (CFDictionaryRef)CFArrayGetValueAtIndex(modes, i);
- ref = (CFNumberRef)CFDictionaryGetValue(mode, kCGDisplayWidth);
- CFNumberGetValue(ref, kCFNumberIntType, &w);
- ref = (CFNumberRef)CFDictionaryGetValue(mode, kCGDisplayHeight);
- CFNumberGetValue(ref, kCFNumberIntType, &h);
- ref = (CFNumberRef)CFDictionaryGetValue(mode,
- kCGDisplayBitsPerPixel);
- CFNumberGetValue(ref, kCFNumberIntType, &d);
-
- if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched))
- continue;
- if (w != x || h != y || d != 32)
- continue;;
-
- CGDisplaySwitchToMode(CGMainDisplayID(), mode);
- }
+ CFDictionaryRef mode;
+ CFNumberRef ref;
+ int x, y, w, h, d;
+
+ sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.\
+ strFullscreenResolution.c_str(), "%dx%d", &x, &y);
+
+ mode = (CFDictionaryRef)CFArrayGetValueAtIndex(modes, i);
+ ref = (CFNumberRef)CFDictionaryGetValue(mode, kCGDisplayWidth);
+ CFNumberGetValue(ref, kCFNumberIntType, &w);
+ ref = (CFNumberRef)CFDictionaryGetValue(mode, kCGDisplayHeight);
+ CFNumberGetValue(ref, kCFNumberIntType, &h);
+ ref = (CFNumberRef)CFDictionaryGetValue(mode,
+ kCGDisplayBitsPerPixel);
+ CFNumberGetValue(ref, kCFNumberIntType, &d);
+
+ if (CFDictionaryContainsKey(mode, kCGDisplayModeIsStretched))
+ continue;
+ if (w != x || h != y || d != 32)
+ continue;;
+
+ CGDisplaySwitchToMode(CGMainDisplayID(), mode);
}
+
#endif
}
@@ -975,14 +968,6 @@ void CFrame::StartGame(const std::string& filename)
m_RenderFrame->Show();
}
-#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- NSView *view = (NSView *) m_RenderFrame->GetHandle();
- NSWindow *window = [view window];
-
- if ([window respondsToSelector:@selector(setCollectionBehavior:)])
- [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
-#endif
-
wxBeginBusyCursor();
DoFullscreen(SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen);
@@ -1155,23 +1140,8 @@ void CFrame::DoStop()
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
m_RenderParent->SetCursor(wxNullCursor);
DoFullscreen(false);
-
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
- {
m_RenderFrame->Destroy();
- }
-#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- else
- {
- // Disable the full screen button when not in a game.
- NSView *view = (NSView *) m_RenderFrame->GetHandle();
- NSWindow *window = [view window];
-
- if ([window respondsToSelector:@selector(setCollectionBehavior:)])
- [window setCollectionBehavior:NSWindowCollectionBehaviorDefault];
- }
-#endif
-
m_RenderParent = NULL;
// Clean framerate indications from the status bar.