[Scummvm-cvs-logs] SF.net SVN: scummvm:[52456] scummvm/trunk/backends/platform/wii
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Mon Aug 30 18:52:23 CEST 2010
Revision: 52456
http://scummvm.svn.sourceforge.net/scummvm/?rev=52456&view=rev
Author: dhewg
Date: 2010-08-30 16:52:23 +0000 (Mon, 30 Aug 2010)
Log Message:
-----------
WII: Abuse pollEvent() to update the screen of skipped frames.
updateScreen() itself skips redraws when called too frequently. With
the right timing and number of consecutive calls this can result in
missing gfx updates, so lets abuse pollEvent() to check for overdue
redraws.
Modified Paths:
--------------
scummvm/trunk/backends/platform/wii/osystem.h
scummvm/trunk/backends/platform/wii/osystem_events.cpp
scummvm/trunk/backends/platform/wii/osystem_gfx.cpp
Modified: scummvm/trunk/backends/platform/wii/osystem.h
===================================================================
--- scummvm/trunk/backends/platform/wii/osystem.h 2010-08-30 16:07:37 UTC (rev 52455)
+++ scummvm/trunk/backends/platform/wii/osystem.h 2010-08-30 16:52:23 UTC (rev 52456)
@@ -117,6 +117,7 @@
void deinitGfx();
void updateScreenResolution();
void switchVideoMode(int mode);
+ bool needsScreenUpdate();
void initSfx();
void deinitSfx();
Modified: scummvm/trunk/backends/platform/wii/osystem_events.cpp
===================================================================
--- scummvm/trunk/backends/platform/wii/osystem_events.cpp 2010-08-30 16:07:37 UTC (rev 52455)
+++ scummvm/trunk/backends/platform/wii/osystem_events.cpp 2010-08-30 16:52:23 UTC (rev 52456)
@@ -300,6 +300,9 @@
return true;
}
+ if (needsScreenUpdate())
+ updateScreen();
+
u32 bd = 0, bh = 0, bu = 0;
if (PAD_ScanPads() & 1) {
Modified: scummvm/trunk/backends/platform/wii/osystem_gfx.cpp
===================================================================
--- scummvm/trunk/backends/platform/wii/osystem_gfx.cpp 2010-08-30 16:07:37 UTC (rev 52455)
+++ scummvm/trunk/backends/platform/wii/osystem_gfx.cpp 2010-08-30 16:52:23 UTC (rev 52456)
@@ -441,6 +441,22 @@
_gameDirty = true;
}
+bool OSystem_Wii::needsScreenUpdate() {
+ if (getMillis() - _lastScreenUpdate < 1000 / MAX_FPS)
+ return false;
+
+ if (_gameRunning && _gameDirty)
+ return true;
+
+ if (_overlayVisible && _overlayDirty)
+ return true;
+
+ if (_mouseVisible && _texMouse.palette && _cursorPaletteDirty)
+ return true;
+
+ return false;
+}
+
void OSystem_Wii::updateScreen() {
static f32 ar;
static gfx_screen_coords_t cc;
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