aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/zvision.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/zvision.cpp')
-rw-r--r--engines/zvision/zvision.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 39d61d9a89..65064d8a66 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -62,7 +62,8 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)
_saveManager(nullptr),
_stringManager(nullptr),
_cursorManager(nullptr),
- _aud_id(0) {
+ _aud_id(0),
+ _rendDelay(2) {
debug(1, "ZVision::ZVision");
}
@@ -156,7 +157,10 @@ Common::Error ZVision::run() {
_renderManager->renderBackbufferToScreen();
// Update the screen
- _system->updateScreen();
+ if (_rendDelay <= 0)
+ _system->updateScreen();
+ else
+ _rendDelay--;
// Calculate the frame delay based off a desired frame time
int delay = _desiredFrameTime - int32(_system->getMillis() - currentTime);
@@ -193,4 +197,12 @@ int ZVision::getAudioId() {
return _aud_id;
}
+void ZVision::setRenderDelay(uint delay) {
+ _rendDelay = delay;
+}
+
+bool ZVision::canRender() {
+ return _rendDelay <= 0;
+}
+
} // End of namespace ZVision