Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2009, 1:03:27 AM (15 years ago)
Author:
rgrieder
Message:

IOConsole should not process input during destruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/IOConsole.cc

    r6214 r6350  
    121121    IOConsole::~IOConsole()
    122122    {
    123         // Empty all buffers
    124         this->preUpdate(Game::getInstance().getGameClock());
     123        // Process output written to std::cout in the meantime
     124        std::cout.flush();
     125        if (!this->origCout_.str().empty())
     126            this->shell_->addOutputLine(this->origCout_.str(), Shell::None);
    125127        // Erase input and status lines
    126128        this->cout_ << "\033[1G\033[J";
     
    504506    IOConsole::~IOConsole()
    505507    {
     508        // Process output written to std::cout in the meantime
     509        std::cout.flush();
     510        if (!this->origCout_.str().empty())
     511            this->shell_->addOutputLine(this->origCout_.str(), Shell::None);
     512
    506513        this->shell_->unregisterListener(this);
    507         // Empty all buffers
    508         this->preUpdate(Game::getInstance().getGameClock());
    509514
    510515        // Erase input and status lines
     
    594599
    595600        // Process output written to std::cout
     601        std::cout.flush();
    596602        if (!this->origCout_.str().empty())
    597603        {
Note: See TracChangeset for help on using the changeset viewer.