diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index acc3753e4e..6c72478456 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -133,7 +133,6 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt) OMW::Engine::Engine(Files::ConfigurationManager& configurationManager) : mOgre (0) , mFpsLevel(0) - , mDebug (false) , mVerboseScripts (false) , mNewGame (false) , mUseSound (true) @@ -283,11 +282,6 @@ void OMW::Engine::addPlugin (const std::string& plugin) } } -void OMW::Engine::setDebugMode(bool debugMode) -{ - mDebug = debugMode; -} - void OMW::Engine::setScriptsVerbosity(bool scriptsVerbosity) { mVerboseScripts = scriptsVerbosity; @@ -331,7 +325,6 @@ std::string OMW::Engine::loadSettings (Settings::Manager & settings) nifOverrides.loadTransparencyOverrides(mCfgMgr.getGlobalPath().string() + "/transparency-overrides.cfg"); settings.setBool("hardware cursors", "GUI", true); - settings.setBool("debug", "Engine", mDebug); return settingspath; } diff --git a/apps/openmw/engine.hpp b/apps/openmw/engine.hpp index f80b67a358..665b0094c1 100644 --- a/apps/openmw/engine.hpp +++ b/apps/openmw/engine.hpp @@ -71,7 +71,6 @@ namespace OMW std::vector mMaster; std::vector mPlugins; int mFpsLevel; - bool mDebug; bool mVerboseScripts; bool mNewGame; bool mUseSound; @@ -147,10 +146,6 @@ namespace OMW /// Enable fps counter void showFPS(int level); - /// Enable debug mode: - /// - non-exclusive input - void setDebugMode(bool debugMode); - /// Enable or disable verbose script output void setScriptsVerbosity(bool scriptsVerbosity); diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 1fa461c2fb..4e40211ba6 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -118,9 +118,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat ("anim-verbose", bpo::value()->implicit_value(true) ->default_value(false), "output animation indices files") - ("debug", bpo::value()->implicit_value(true) - ->default_value(false), "debug mode") - ("nosound", bpo::value()->implicit_value(true) ->default_value(false), "disable all sounds") @@ -243,7 +240,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat engine.setNewGame(variables["new-game"].as()); // other settings - engine.setDebugMode(variables["debug"].as()); engine.setSoundUsage(!variables["nosound"].as()); engine.setScriptsVerbosity(variables["script-verbose"].as()); engine.setCompileAll(variables["script-all"].as()); diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 5ca82bc8a8..38efbbff01 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -221,7 +221,7 @@ namespace MWGui unsetSelectedWeapon(); //set up the hardware cursor manager - mCursorManager = new SFO::SDLCursorManager(Settings::Manager::getBool("debug", "Engine")); + mCursorManager = new SFO::SDLCursorManager(); MyGUI::PointerManager::getInstance().eventChangeMousePointer += MyGUI::newDelegate(this, &WindowManager::onCursorChange); diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 724caf874b..f19f634589 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -99,7 +99,6 @@ namespace MWInput , mMouseWheel(0) , mDragDrop(false) , mGuiCursorEnabled(false) - , mDebug(Settings::Manager::getBool("debug", "Engine")) , mUserFile(userFile) , mUserFileExists(userFileExists) , mInvertY (Settings::Manager::getBool("invert y axis", "Input")) @@ -272,26 +271,23 @@ namespace MWInput // event callbacks (which may crash) mWindows.update(); - if(!mDebug) + bool main_menu = mWindows.containsMode(MWGui::GM_MainMenu); + + bool was_relative = mInputManager->getMouseRelative(); + bool is_relative = !mWindows.isGuiMode(); + + // don't keep the pointer away from the window edge in gui mode + // stop using raw mouse motions and switch to system cursor movements + mInputManager->setMouseRelative(is_relative); + + //we let the mouse escape in the main menu + mInputManager->setGrabPointer(!main_menu); + + //we switched to non-relative mode, move our cursor to where the in-game + //cursor is + if( !is_relative && was_relative != is_relative ) { - bool main_menu = mWindows.containsMode(MWGui::GM_MainMenu); - - bool was_relative = mInputManager->getMouseRelative(); - bool is_relative = !mWindows.isGuiMode(); - - // don't keep the pointer away from the window edge in gui mode - // stop using raw mouse motions and switch to system cursor movements - mInputManager->setMouseRelative(is_relative); - - //we let the mouse escape in the main menu - mInputManager->setGrabPointer(!main_menu); - - //we switched to non-relative mode, move our cursor to where the in-game - //cursor is - if( !is_relative && was_relative != is_relative ) - { - mInputManager->warpMouse(mMouseX, mMouseY); - } + mInputManager->warpMouse(mMouseX, mMouseY); } // Disable movement in Gui mode @@ -597,19 +593,12 @@ namespace MWInput bool InputManager::windowFocusChange(bool have_focus) { - if(!mDebug) - { - - } return true; } bool InputManager::windowVisibilityChange(bool visible) { - if(!mDebug) - { //TODO: Pause game? - } return true; } diff --git a/apps/openmw/mwinput/inputmanagerimp.hpp b/apps/openmw/mwinput/inputmanagerimp.hpp index 788f116acd..f463de811a 100644 --- a/apps/openmw/mwinput/inputmanagerimp.hpp +++ b/apps/openmw/mwinput/inputmanagerimp.hpp @@ -147,7 +147,6 @@ namespace MWInput bool mMouseLookEnabled; bool mGuiCursorEnabled; - bool mDebug; float mOverencumberedMessageDelay; diff --git a/extern/sdl4ogre/sdlcursormanager.cpp b/extern/sdl4ogre/sdlcursormanager.cpp index d817ce9c4e..d14a9ffa09 100644 --- a/extern/sdl4ogre/sdlcursormanager.cpp +++ b/extern/sdl4ogre/sdlcursormanager.cpp @@ -8,8 +8,7 @@ namespace SFO { - SDLCursorManager::SDLCursorManager(bool debug) : - mDebug(debug), + SDLCursorManager::SDLCursorManager() : mEnabled(false), mCursorVisible(false), mInitialized(false) @@ -45,8 +44,7 @@ namespace SFO //turn off hardware cursors else { - if(!mDebug) - SDL_ShowCursor(SDL_FALSE); + SDL_ShowCursor(SDL_FALSE); } } @@ -72,7 +70,7 @@ namespace SFO void SDLCursorManager::_setGUICursor(const std::string &name) { - if(mEnabled && (mDebug || mCursorVisible)) + if(mEnabled && mCursorVisible) { SDL_SetCursor(mCursorMap.find(name)->second); _setCursorVisible(mCursorVisible); @@ -84,9 +82,6 @@ namespace SFO if(!mEnabled) return; - if(mDebug) - visible = true; - SDL_ShowCursor(visible ? SDL_TRUE : SDL_FALSE); } diff --git a/extern/sdl4ogre/sdlcursormanager.hpp b/extern/sdl4ogre/sdlcursormanager.hpp index 2cfb73a91e..3dae42f42f 100644 --- a/extern/sdl4ogre/sdlcursormanager.hpp +++ b/extern/sdl4ogre/sdlcursormanager.hpp @@ -12,7 +12,7 @@ namespace SFO public CursorManager { public: - SDLCursorManager(bool debug=false); + SDLCursorManager(); virtual ~SDLCursorManager(); virtual void setEnabled(bool enabled); @@ -36,8 +36,6 @@ namespace SFO bool mEnabled; bool mInitialized; bool mCursorVisible; - bool mDebug; - }; }