Changeset 6172 for code/branches/presentation2
- Timestamp:
- Nov 27, 2009, 12:42:38 PM (15 years ago)
- Location:
- code/branches/presentation2/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/IOConsole.cc
r6171 r6172 117 117 namespace orxonox 118 118 { 119 termios* IOConsole::originalTerminalSettings_s = 0;120 121 119 namespace EscapeMode 122 120 { … … 135 133 , bStatusPrinted_(false) 136 134 , promptString_("orxonox # ") 135 , originalTerminalSettings_(0) 137 136 { 138 137 this->setTerminalMode(); … … 369 368 { 370 369 termios new_settings; 371 IOConsole::originalTerminalSettings_s= new termios();372 373 tcgetattr(0, this->originalTerminalSettings_ s);374 new_settings = *this->originalTerminalSettings_ s;370 this->originalTerminalSettings_ = new termios(); 371 372 tcgetattr(0, this->originalTerminalSettings_); 373 new_settings = *this->originalTerminalSettings_; 375 374 new_settings.c_lflag &= ~(ICANON | ECHO); 376 375 //new_settings.c_lflag |= (ISIG | IEXTEN); … … 383 382 /*static*/ void IOConsole::resetTerminalMode() 384 383 { 385 if(IOConsole:: originalTerminalSettings_s)386 { 387 tcsetattr(0, TCSANOW, IOConsole:: originalTerminalSettings_s);388 delete IOConsole:: originalTerminalSettings_s;389 IOConsole:: originalTerminalSettings_s= 0;384 if(IOConsole::singletonPtr_s && IOConsole::singletonPtr_s->originalTerminalSettings_) 385 { 386 tcsetattr(0, TCSANOW, IOConsole::singletonPtr_s->originalTerminalSettings_); 387 delete IOConsole::singletonPtr_s->originalTerminalSettings_; 388 IOConsole::singletonPtr_s->originalTerminalSettings_ = 0; 390 389 } 391 390 } -
code/branches/presentation2/src/libraries/core/IOConsole.h
r6171 r6172 93 93 94 94 #ifdef ORXONOX_PLATFORM_UNIX 95 static termios* originalTerminalSettings_s;95 termios* originalTerminalSettings_; 96 96 #elif defined(ORXONOX_PLATFORM_WINDOWS) 97 97 void moveCursor(int dx, int dy);
Note: See TracChangeset
for help on using the changeset viewer.