mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 00:26:45 +00:00 
			
		
		
		
	Removed the no longer needed --debug switch
This commit is contained in:
		
							parent
							
								
									4fd7891d2c
								
							
						
					
					
						commit
						b16bc69479
					
				
					 8 changed files with 21 additions and 56 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,7 +71,6 @@ namespace OMW
 | 
			
		|||
            std::vector<std::string> mMaster;
 | 
			
		||||
            std::vector<std::string> 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);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,9 +118,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
 | 
			
		|||
        ("anim-verbose", bpo::value<bool>()->implicit_value(true)
 | 
			
		||||
            ->default_value(false), "output animation indices files")
 | 
			
		||||
 | 
			
		||||
        ("debug", bpo::value<bool>()->implicit_value(true)
 | 
			
		||||
            ->default_value(false), "debug mode")
 | 
			
		||||
 | 
			
		||||
        ("nosound", bpo::value<bool>()->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<bool>());
 | 
			
		||||
 | 
			
		||||
    // other settings
 | 
			
		||||
    engine.setDebugMode(variables["debug"].as<bool>());
 | 
			
		||||
    engine.setSoundUsage(!variables["nosound"].as<bool>());
 | 
			
		||||
    engine.setScriptsVerbosity(variables["script-verbose"].as<bool>());
 | 
			
		||||
    engine.setCompileAll(variables["script-all"].as<bool>());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -147,7 +147,6 @@ namespace MWInput
 | 
			
		|||
 | 
			
		||||
        bool mMouseLookEnabled;
 | 
			
		||||
        bool mGuiCursorEnabled;
 | 
			
		||||
        bool mDebug;
 | 
			
		||||
 | 
			
		||||
        float mOverencumberedMessageDelay;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								extern/sdl4ogre/sdlcursormanager.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								extern/sdl4ogre/sdlcursormanager.cpp
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								extern/sdl4ogre/sdlcursormanager.hpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								extern/sdl4ogre/sdlcursormanager.hpp
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -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;
 | 
			
		||||
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue