mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-04-19 19:16:38 +00:00
Split CPU raster display time from vertical blank time.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
+2
-1
@@ -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);
|
||||
|
||||
+3
-1
@@ -103,7 +103,7 @@ void Game::runLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
runFrame();
|
||||
runRasterLines();
|
||||
|
||||
updateTexture();
|
||||
copyTexture();
|
||||
@@ -119,6 +119,8 @@ void Game::runLoop() {
|
||||
::SDL_Delay(sleepNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
runVerticalBlank();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user