| 543 | } |
| 544 | |
| 545 | void idConsoleLocal::LoadHistory() { |
| 546 | idFile *f = fileSystem->OpenFileRead( "consolehistory.dat" ); |
| 547 | if ( f == NULL ) // file doesn't exist |
| 548 | return; |
| 549 | |
| 550 | historyLine = 0; |
| 551 | idStr tmp; |
| 552 | for ( int i=0; i < COMMAND_HISTORY; ++i ) { |
| 553 | if ( f->Tell() >= f->Length() ) { |
| 554 | break; // EOF is reached |
| 555 | } |
| 556 | f->ReadString(tmp); |
| 557 | historyEditLines[i].SetBuffer(tmp.c_str()); |
| 558 | ++historyLine; |
| 559 | } |
| 560 | nextHistoryLine = historyLine; |
| 561 | fileSystem->CloseFile(f); |
| 562 | } |
| 563 | |
| 564 | /* |
| 565 | ================ |
no test coverage detected