aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/n64/osys_n64_base.cpp
diff options
context:
space:
mode:
authorFabio Battaglia2010-02-21 19:02:45 +0000
committerFabio Battaglia2010-02-21 19:02:45 +0000
commit2ca06e3e0a023ce4f55e2aab262c2c877f7af4b7 (patch)
tree42cc8e818fca953fb44419d1a45c15b26f70b675 /backends/platform/n64/osys_n64_base.cpp
parent4577a9038af8a89476dc35511cd4afb042bc62b4 (diff)
downloadscummvm-rg350-2ca06e3e0a023ce4f55e2aab262c2c877f7af4b7.tar.gz
scummvm-rg350-2ca06e3e0a023ce4f55e2aab262c2c877f7af4b7.tar.bz2
scummvm-rg350-2ca06e3e0a023ce4f55e2aab262c2c877f7af4b7.zip
N64: force screen update after hiding overlay
svn-id: r48108
Diffstat (limited to 'backends/platform/n64/osys_n64_base.cpp')
-rw-r--r--backends/platform/n64/osys_n64_base.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 2ee99d2ddc..cde5208bda 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -83,6 +83,8 @@ OSystem_N64::OSystem_N64() {
// Max FPS
_maxFps = N64_NTSC_FPS;
+ _disableFpsLimit = false;
+
_overlayVisible = false;
_shakeOffset = 0;
@@ -486,11 +488,13 @@ void OSystem_N64::copyRectToScreen(const byte *buf, int pitch, int x, int y, int
void OSystem_N64::updateScreen() {
#ifdef LIMIT_FPS
static uint32 _lastScreenUpdate = 0;
- uint32 now = getMillis();
- if (now - _lastScreenUpdate < 1000 / _maxFps)
- return;
+ if (!_disableFpsLimit) {
+ uint32 now = getMillis();
+ if (now - _lastScreenUpdate < 1000 / _maxFps)
+ return;
- _lastScreenUpdate = now;
+ _lastScreenUpdate = now;
+ }
#endif
// Check if audio buffer needs refill
@@ -647,6 +651,14 @@ void OSystem_N64::hideOverlay() {
clearAllVideoBuffers();
_dirtyOffscreen = true;
+
+ // Force TWO screen updates (because of double buffered display).
+ // This way games which won't automatically update the screen
+ // when overlay is disabled, won't show a black screen. (eg. Lure)
+ _disableFpsLimit = true;
+ updateScreen();
+ updateScreen();
+ _disableFpsLimit = false;
}
void OSystem_N64::clearOverlay() {