From 4534b68fc582ea2b2a6237ccf83b4d118c8c946b Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sat, 25 Jun 2016 19:43:20 +0200 Subject: [PATCH] Remove instant quit on Ctrl+Alt+Q, allow Alt+Enter for fullscreen switch on OSX --- Aquaria/DSQ.cpp | 17 ++--------------- BBGE/Core.cpp | 9 --------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 7841bf6..6f05c20 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -258,15 +258,8 @@ void DSQ::toggleFullscreen() // for handling the input, not the actual switch functionality void DSQ::onSwitchScreenMode() { - - { - -#if defined(BBGE_BUILD_WINDOWS) || defined(BBGE_BUILD_UNIX) - if (getAltState()) { - toggleFullscreen(); - } -#endif - } + if (getAltState()) + toggleFullscreen(); } void DSQ::forceInputGrabOff() @@ -3844,19 +3837,13 @@ void DSQ::bindInput() user.control.actionSet.importAction(this, "Escape", ACTION_ESC); -#if defined(BBGE_BUILD_MACOSX) - addAction(MakeFunctionEvent(DSQ, instantQuit), KEY_Q, 1); -#endif -#if defined(BBGE_BUILD_WINDOWS) || defined(BBGE_BUILD_UNIX) addAction(MakeFunctionEvent(DSQ, onSwitchScreenMode), KEY_RETURN, 1); -#endif if (isDeveloperKeys()) { #ifdef AQUARIA_BUILD_CONSOLE addAction(MakeFunctionEvent(DSQ, toggleConsole), KEY_TILDE, 0); #endif - addAction(MakeFunctionEvent(DSQ, instantQuit), KEY_Q, 1); addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0); } addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0); diff --git a/BBGE/Core.cpp b/BBGE/Core.cpp index dfb6ef5..986d7fb 100644 --- a/BBGE/Core.cpp +++ b/BBGE/Core.cpp @@ -2757,13 +2757,6 @@ void Core::shutdown() //util funcs -void Core::instantQuit() -{ - SDL_Event event; - event.type = SDL_QUIT; - SDL_PushEvent(&event); -} - bool Core::exists(const std::string &filename) { return ::exists(filename, false); // defined in Base.cpp @@ -2771,8 +2764,6 @@ bool Core::exists(const std::string &filename) CountedPtr Core::findTexture(const std::string &name) { - - int sz = resources.size(); for (int i = 0; i < sz; i++) {