main: delay und processInput in jedem Schleifendurchlauf

This commit is contained in:
Julia09055x 2023-12-12 13:10:09 +01:00
parent c461b2af84
commit 5c99e2ac79

View File

@ -54,12 +54,11 @@ int main(int argc, char *argv[])
if (now - game.timestampLastCycle > config.cycleDurationMs){ if (now - game.timestampLastCycle > config.cycleDurationMs){
game.timestampLastCycle = now; game.timestampLastCycle = now;
runGameCycle(); runGameCycle();
} else{ }
}
DELAY(5); //verhindert maximale Durchlaufgeschwindigkeit der Schleife DELAY(5); //verhindert maximale Durchlaufgeschwindigkeit der Schleife
processInputEvent(); processInputEvent();
} }
}
}
DestroySDLWindow(); DestroySDLWindow();