Split CPU raster display time from vertical blank time.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-09-29 01:46:56 +01:00
parent 7a6e0eafcd
commit 74ab3d0f01
2 changed files with 5 additions and 2 deletions

View File

@ -47,7 +47,8 @@ namespace Gaming {
virtual std::string title() const = 0;
virtual void runFrame() = 0;
virtual void runRasterLines() {};
virtual void runVerticalBlank() {}
void addJoystick(SDL_Event& e);
void removeJoystick(SDL_Event& e);

View File

@ -103,7 +103,7 @@ void Game::runLoop() {
}
}
runFrame();
runRasterLines();
updateTexture();
copyTexture();
@ -119,6 +119,8 @@ void Game::runLoop() {
::SDL_Delay(sleepNeeded);
}
}
runVerticalBlank();
}
}