Merge pull request #4227 from ligfx/clean_objc

Don't force compile everything as Objective-C++ on macOS
This commit is contained in:
shuffle2
2016-10-02 19:42:04 -07:00
committed by GitHub
13 changed files with 89 additions and 133 deletions

View File

@ -21,10 +21,6 @@
#include <wx/toolbar.h>
#include <wx/toplevel.h>
#ifdef __APPLE__
#include <AppKit/AppKit.h>
#endif
#include "Common/CDUtils.h"
#include "Common/CommonTypes.h"
#include "Common/FileSearch.h"
@ -1022,10 +1018,7 @@ void CFrame::StartGame(const std::string& filename)
}
#if defined(__APPLE__)
NSView* view = (NSView*)m_RenderFrame->GetHandle();
NSWindow* window = [view window];
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
m_RenderFrame->EnableFullScreenView(true);
#endif
wxBeginBusyCursor();
@ -1241,10 +1234,7 @@ void CFrame::OnStopped()
{
#if defined(__APPLE__)
// Disable the full screen button when not in a game.
NSView* view = (NSView*)m_RenderFrame->GetHandle();
NSWindow* window = [view window];
[window setCollectionBehavior:NSWindowCollectionBehaviorDefault];
m_RenderFrame->EnableFullScreenView(false);
#endif
// Make sure the window is not longer set to stay on top