uncommited code for 151 release (PSP suspend, file browser, etc)
[libpicofe.git] / psp / main.c
index 4c7eef6..a2e99aa 100644 (file)
@@ -12,7 +12,6 @@
 #include "../common/emu.h"
 #include "../common/config.h"
 #include "../common/lprintf.h"
-#include "version.h"
 
 #ifdef GPROF
 #include <pspprof.h>
@@ -32,7 +31,6 @@ void dummy(void)
 
 int pico_main(void)
 {
-       lprintf("\nPicoDrive v" VERSION " " __DATE__ " " __TIME__ "\n");
        psp_init();
 
        emu_prepareDefaultConfig();
@@ -75,13 +73,22 @@ int pico_main(void)
                                        psp_wait_suspend();
                                break;
 
+                       case PGS_SuspendWake:
+                               psp_unhandled_suspend = 0;
+                               psp_resume_suspend();
+                               emu_HandleResume();
+                               engineState = engineStateSuspend;
+                               break;
+
                        case PGS_RestartRun:
                                engineState = PGS_Running;
 
                        case PGS_Running:
                                if (psp_unhandled_suspend) {
+                                       psp_unhandled_suspend = 0;
                                        psp_resume_suspend();
                                        emu_HandleResume();
+                                       break;
                                }
                                emu_Loop();
 #ifdef GPROF