mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-09-29 15:56:19 +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 std::string title() const = 0;
|
||||||
|
|
||||||
virtual void runFrame() = 0;
|
virtual void runRasterLines() {};
|
||||||
|
virtual void runVerticalBlank() {}
|
||||||
|
|
||||||
void addJoystick(SDL_Event& e);
|
void addJoystick(SDL_Event& e);
|
||||||
void removeJoystick(SDL_Event& e);
|
void removeJoystick(SDL_Event& e);
|
||||||
|
@ -103,7 +103,7 @@ void Game::runLoop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runFrame();
|
runRasterLines();
|
||||||
|
|
||||||
updateTexture();
|
updateTexture();
|
||||||
copyTexture();
|
copyTexture();
|
||||||
@ -119,6 +119,8 @@ void Game::runLoop() {
|
|||||||
::SDL_Delay(sleepNeeded);
|
::SDL_Delay(sleepNeeded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runVerticalBlank();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user