| 549 | } |
| 550 | |
| 551 | void FindAndSelectLastLoadedFile () |
| 552 | { |
| 553 | int indexFound = -1; |
| 554 | |
| 555 | for(int j=1; j < browser.numEntries; j++) |
| 556 | { |
| 557 | if(strcmp(browserList[j].filename, GCSettings.LastFileLoaded) == 0) |
| 558 | { |
| 559 | indexFound = j; |
| 560 | break; |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | // move to this file |
| 565 | if(indexFound > 0) |
| 566 | { |
| 567 | if(indexFound >= FILE_PAGESIZE) |
| 568 | { |
| 569 | int newIndex = (floor(indexFound/(float)FILE_PAGESIZE)) * FILE_PAGESIZE; |
| 570 | |
| 571 | if(newIndex + FILE_PAGESIZE > browser.numEntries) |
| 572 | newIndex = browser.numEntries - FILE_PAGESIZE; |
| 573 | |
| 574 | if(newIndex < 0) |
| 575 | newIndex = 0; |
| 576 | |
| 577 | browser.pageIndex = newIndex; |
| 578 | } |
| 579 | browser.selIndex = indexFound; |
| 580 | } |
| 581 | |
| 582 | selectLoadedFile = 2; // selecting done |
| 583 | } |
| 584 | |
| 585 | static bool ParseDirEntries() |
| 586 | { |
no outgoing calls
no test coverage detected