aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp/psp_main.cpp
diff options
context:
space:
mode:
authorNeeraj Kumar2010-08-06 20:13:41 +0000
committerNeeraj Kumar2010-08-06 20:13:41 +0000
commit7e126ed299cb789340cb2f8d409338dbdd6c8235 (patch)
tree91f6e4be633fd579922ddf270443011582b8f9ec /backends/platform/psp/psp_main.cpp
parent6c0855f3d3efc52478ba9ce019fbd4c9287f4691 (diff)
parent4ae7427eed781613e2cda096d0f61c77883bca05 (diff)
downloadscummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.gz
scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.tar.bz2
scummvm-rg350-7e126ed299cb789340cb2f8d409338dbdd6c8235.zip
TESTBED: Merged changes from trunk to my branch
svn-id: r51798
Diffstat (limited to 'backends/platform/psp/psp_main.cpp')
-rw-r--r--backends/platform/psp/psp_main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp
index e6940eba13..dba9a8fc2b 100644
--- a/backends/platform/psp/psp_main.cpp
+++ b/backends/platform/psp/psp_main.cpp
@@ -44,6 +44,7 @@
#include "backends/plugins/psp/psp-provider.h"
#include "backends/platform/psp/psppixelformat.h"
#include "backends/platform/psp/osys_psp.h"
+#include "backends/platform/psp/tests.h" /* for unit/speed tests */
#include "backends/platform/psp/trace.h"
#ifdef ENABLE_PROFILING
@@ -110,12 +111,13 @@ int exit_callback(void) {
}
/* Function for handling suspend/resume */
-void power_callback(int , int powerinfo) {
+int power_callback(int , int powerinfo, void *) {
if (powerinfo & PSP_POWER_CB_POWER_SWITCH || powerinfo & PSP_POWER_CB_SUSPENDING) {
PowerMan.suspend();
} else if (powerinfo & PSP_POWER_CB_RESUME_COMPLETE) {
PowerMan.resume();
}
+ return 0;
}
/* Callback thread */
@@ -168,6 +170,13 @@ int main(void) {
PluginManager::instance().addPluginProvider(new PSPPluginProvider());
#endif
+/* unit/speed tests */
+#if defined (PSP_ENABLE_UNIT_TESTS) || defined (PSP_ENABLE_SPEED_TESTS)
+ PSP_INFO_PRINT("running tests\n");
+ psp_tests();
+ sceKernelSleepThread(); // that's it. That's all we're doing
+#endif
+
int res = scummvm_main(argc, argv);
g_system->quit(); // TODO: Consider removing / replacing this!