[Scummvm-cvs-logs] SF.net SVN: scummvm:[43539] scummvm/trunk/backends/platform/psp
joostp at users.sourceforge.net
joostp at users.sourceforge.net
Wed Aug 19 18:23:45 CEST 2009
Revision: 43539
http://scummvm.svn.sourceforge.net/scummvm/?rev=43539&view=rev
Author: joostp
Date: 2009-08-19 16:23:44 +0000 (Wed, 19 Aug 2009)
Log Message:
-----------
PSP: throttle the number of updateScreen() calls
Modified Paths:
--------------
scummvm/trunk/backends/platform/psp/osys_psp.cpp
scummvm/trunk/backends/platform/psp/osys_psp.h
scummvm/trunk/backends/platform/psp/osys_psp_gu.cpp
Modified: scummvm/trunk/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.cpp 2009-08-19 16:23:26 UTC (rev 43538)
+++ scummvm/trunk/backends/platform/psp/osys_psp.cpp 2009-08-19 16:23:44 UTC (rev 43539)
@@ -75,7 +75,7 @@
};
-OSystem_PSP::OSystem_PSP() : _screenWidth(0), _screenHeight(0), _overlayWidth(0), _overlayHeight(0), _offscreen(0), _overlayBuffer(0), _overlayVisible(false), _shakePos(0), _mouseBuf(0), _prevButtons(0), _lastPadCheck(0), _padAccel(0), _mixer(0) {
+OSystem_PSP::OSystem_PSP() : _screenWidth(0), _screenHeight(0), _overlayWidth(0), _overlayHeight(0), _offscreen(0), _overlayBuffer(0), _overlayVisible(false), _shakePos(0), _lastScreenUpdate(0), _mouseBuf(0), _prevButtons(0), _lastPadCheck(0), _padAccel(0), _mixer(0) {
memset(_palette, 0, sizeof(_palette));
Modified: scummvm/trunk/backends/platform/psp/osys_psp.h
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.h 2009-08-19 16:23:26 UTC (rev 43538)
+++ scummvm/trunk/backends/platform/psp/osys_psp.h 2009-08-19 16:23:44 UTC (rev 43539)
@@ -59,6 +59,7 @@
uint16 _palette[256];
bool _overlayVisible;
uint32 _shakePos;
+ uint32 _lastScreenUpdate;
Graphics::Surface _framebuffer;
Modified: scummvm/trunk/backends/platform/psp/osys_psp_gu.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp_gu.cpp 2009-08-19 16:23:26 UTC (rev 43538)
+++ scummvm/trunk/backends/platform/psp/osys_psp_gu.cpp 2009-08-19 16:23:44 UTC (rev 43539)
@@ -38,6 +38,8 @@
#define MOUSE_SIZE 128
#define KBD_DATA_SIZE 130560
+#define MAX_FPS 30
+
unsigned int __attribute__((aligned(16))) list[262144];
unsigned short __attribute__((aligned(16))) clut256[256];
unsigned short __attribute__((aligned(16))) mouseClut[256];
@@ -295,6 +297,13 @@
}
void OSystem_PSP_GU::updateScreen() {
+ u32 now = getMillis();
+ if (now - _lastScreenUpdate < 1000 / MAX_FPS)
+ return;
+
+ _lastScreenUpdate = now;
+
+
sceGuStart(0,list);
sceGuClearColor(0xff000000);
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