MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Interrupt_Sim

Method Interrupt_Sim

Source/Fodder.cpp:609–629  ·  view source on GitHub ↗

* Interrupt Simulation */

Source from the content-addressed store, hash-verified

607 * Interrupt Simulation
608 */
609void 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
631void cFodder::Phase_Loop_Interrupt() {
632

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected