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/Shell.cc

    r1325 r1326  
    3131#include "CoreIncludes.h"
    3232#include "ConfigValueIncludes.h"
     33#include "CoreSettings.h"
    3334
    3435#define SHELL_UPDATE_LISTENERS(function) \
     
    7071    }
    7172
     73    Shell& Shell::createShell()
     74    {
     75        int level = CoreSettings::getSoftDebugLevel(OutputHandler::LD_Shell);
     76        CoreSettings::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
     77        static Shell instance;
     78        CoreSettings::setSoftDebugLevel(OutputHandler::LD_Shell, level);
     79        return instance;
     80    }
     81
    7282    Shell& Shell::getInstance()
    7383    {
    74         static Shell instance;
     84        static Shell& instance = createShell();
    7585        return instance;
    7686    }
     
    325335
    326336        this->clear();
     337        this->scrollPosition_ = 0;
     338        this->scrollIterator_ = this->lines_.begin();
     339
    327340        SHELL_UPDATE_LISTENERS(exit);
    328341    }
Note: See TracChangeset for help on using the changeset viewer.