Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 4:37:06 PM (16 years ago)
Author:
landauf
Message:

fixed crash when displaying debug-level 4 and 5 in the InGameConsole. It works perfectly now, although it's not recommended, because you won't see much of your own input in the console any more ;)
however, performance is quite good. maybe i can improve it even more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/CoreSettings.cc

    r1058 r1326  
    117117
    118118    /**
    119         @brief Static function that holds the singleton.
     119        @brief Returns the softDebugLevel for the given device (returns a default-value if the class ist right about to be created).
     120        @param device The device
     121        @return The softDebugLevel
    120122    */
    121123    int CoreSettings::getSoftDebugLevel(OutputHandler::OutputDevice device)
     
    136138        return 2;
    137139    }
     140
     141     /**
     142        @brief Sets the softDebugLevel for the given device. Please use this only temporary and restore the value afterwards, as it overrides the configured value.
     143        @param device The device
     144        @param level The level
     145    */
     146     void CoreSettings::setSoftDebugLevel(OutputHandler::OutputDevice device, int level)
     147     {
     148        if (!CoreSettings::isCreatingCoreSettings())
     149        {
     150            if (device == OutputHandler::LD_All)
     151                CoreSettings::getInstance().softDebugLevel_ = level;
     152            else if (device == OutputHandler::LD_Console)
     153                CoreSettings::getInstance().softDebugLevelConsole_ = level;
     154            else if (device == OutputHandler::LD_Logfile)
     155                CoreSettings::getInstance().softDebugLevelLogfile_ = level;
     156            else if (device == OutputHandler::LD_Shell)
     157                CoreSettings::getInstance().softDebugLevelShell_ = level;
     158        }
     159     }
    138160
    139161    /**
Note: See TracChangeset for help on using the changeset viewer.