[Scummvm-cvs-logs] SF.net SVN: scummvm:[48108] scummvm/trunk/backends/platform/n64
Hkz at users.sourceforge.net
Hkz at users.sourceforge.net
Sun Feb 21 20:02:46 CET 2010
Revision: 48108
http://scummvm.svn.sourceforge.net/scummvm/?rev=48108&view=rev
Author: Hkz
Date: 2010-02-21 19:02:45 +0000 (Sun, 21 Feb 2010)
Log Message:
-----------
N64: force screen update after hiding overlay
Modified Paths:
--------------
scummvm/trunk/backends/platform/n64/osys_n64.h
scummvm/trunk/backends/platform/n64/osys_n64_base.cpp
Modified: scummvm/trunk/backends/platform/n64/osys_n64.h
===================================================================
--- scummvm/trunk/backends/platform/n64/osys_n64.h 2010-02-21 19:01:04 UTC (rev 48107)
+++ scummvm/trunk/backends/platform/n64/osys_n64.h 2010-02-21 19:02:45 UTC (rev 48108)
@@ -113,6 +113,8 @@
uint16 _overlayHeight, _overlayWidth;
bool _overlayVisible;
+ bool _disableFpsLimit; // When this is enabled, the system doesn't limit screen updates
+
bool _mouseVisible;
volatile int _mouseX, _mouseY;
volatile float _tempMouseX, _tempMouseY;
Modified: scummvm/trunk/backends/platform/n64/osys_n64_base.cpp
===================================================================
--- scummvm/trunk/backends/platform/n64/osys_n64_base.cpp 2010-02-21 19:01:04 UTC (rev 48107)
+++ scummvm/trunk/backends/platform/n64/osys_n64_base.cpp 2010-02-21 19:02:45 UTC (rev 48108)
@@ -83,6 +83,8 @@
// Max FPS
_maxFps = N64_NTSC_FPS;
+ _disableFpsLimit = false;
+
_overlayVisible = false;
_shakeOffset = 0;
@@ -486,11 +488,13 @@
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 @@
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() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list