mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
N64: force screen update after hiding overlay
svn-id: r48108
This commit is contained in:
parent
4577a9038a
commit
2ca06e3e0a
@ -113,6 +113,8 @@ protected:
|
||||
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;
|
||||
|
@ -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;
|
||||
if (!_disableFpsLimit) {
|
||||
uint32 now = getMillis();
|
||||
if (now - _lastScreenUpdate < 1000 / _maxFps)
|
||||
return;
|
||||
|
||||
_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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user