* Interrupt Simulation */
| 607 | * Interrupt Simulation |
| 608 | */ |
| 609 | void cFodder::Interrupt_Sim() { |
| 610 | Uint32 startTick = SDL_GetTicks(); |
| 611 | |
| 612 | while (!mExit) { |
| 613 | Uint32 currentTick = SDL_GetTicks(); |
| 614 | |
| 615 | if (currentTick - startTick >= g_Fodder->mParams->mSleepDelta) { |
| 616 | startTick = currentTick; |
| 617 | |
| 618 | Interrupt_Redraw(); |
| 619 | |
| 620 | // wait for video_sleep call to finish |
| 621 | while (!mVideo_Done && !mExit) { |
| 622 | SDL_Delay(g_Fodder->mParams->mSleepDelta == 0 ? 0 : 1); |
| 623 | } |
| 624 | } |
| 625 | else { |
| 626 | SDL_Delay(1); |
| 627 | } |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | void cFodder::Phase_Loop_Interrupt() { |
| 632 |
nothing calls this directly
no outgoing calls
no test coverage detected