Changeset 3284 for code/branches/netp6/src/orxonox/gamestates
- Timestamp:
- Jul 13, 2009, 6:03:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/orxonox/gamestates/GSDedicated.cc
r3283 r3284 42 42 #include <boost/bind.hpp> 43 43 44 #if ndef ORXONOX_PLATFORM_WINDOWS44 #ifdef ORXONOX_PLATFORM_UNIX 45 45 #include <termios.h> 46 46 #endif … … 65 65 , cursorY_(0) 66 66 { 67 this->commandLine_ = new unsigned char[MAX_COMMAND_LENGTH];68 // memset( this->commandLine_, 0, MAX_COMMAND_LENGTH );69 67 } 70 68 … … 96 94 97 95 closeThread_ = true; 98 #if ndef ORXONOX_PLATFORM_WINDOWS96 #ifdef ORXONOX_PLATFORM_UNIX 99 97 std::cout << "\033[0G\033[K"; 100 98 std::cout.flush(); … … 105 103 inputThread_->join(); 106 104 delete this->inputThread_; 107 108 if (this->commandLine_ )109 delete[] this->commandLine_;110 105 111 106 GameMode::setHasServer(false); … … 132 127 void GSDedicated::inputThread() 133 128 { 129 this->commandLine_ = new unsigned char[MAX_COMMAND_LENGTH]; 130 // memset( this->commandLine_, 0, MAX_COMMAND_LENGTH ); 134 131 unsigned char c; 135 132 unsigned int escapeChar=0; … … 213 210 } 214 211 } 212 213 delete[] this->commandLine_; 215 214 } 216 215 217 216 void GSDedicated::printLine() 218 217 { 219 #if ndef ORXONOX_PLATFORM_WINDOWS218 #ifdef ORXONOX_PLATFORM_UNIX 220 219 // set cursor to the begining of the line and erase the line 221 220 std::cout << "\033[0G\033[K"; … … 257 256 void GSDedicated::setTerminalMode() 258 257 { 259 #if ndef ORXONOX_PLATFORM_WINDOWS258 #ifdef ORXONOX_PLATFORM_UNIX 260 259 termios new_settings; 261 260 … … 274 273 void GSDedicated::resetTerminalMode() 275 274 { 276 #if ndef ORXONOX_PLATFORM_WINDOWS275 #ifdef ORXONOX_PLATFORM_UNIX 277 276 tcsetattr(0, TCSANOW, GSDedicated::originalTerminalSettings_); 278 277 #endif
Note: See TracChangeset
for help on using the changeset viewer.