mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-12 17:04:46 +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:
parent
7a6e0eafcd
commit
74ab3d0f01
@ -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);
|
||||
|
@ -103,7 +103,7 @@ void Game::runLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
runFrame();
|
||||
runRasterLines();
|
||||
|
||||
updateTexture();
|
||||
copyTexture();
|
||||
@ -119,6 +119,8 @@ void Game::runLoop() {
|
||||
::SDL_Delay(sleepNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
runVerticalBlank();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user