+/* Power Callback */
+static int power_callback(int unknown, int pwrflags, void *common)
+{
+ /* check for power switch and suspending as one is manual and the other automatic */
+ if (pwrflags & PSP_POWER_CB_POWER_SWITCH || pwrflags & PSP_POWER_CB_SUSPENDING)
+ {
+ lprintf("power_callback: flags: 0x%08X: suspending\n", pwrflags);
+ engineState = PGS_Menu;
+ }
+ sceDisplayWaitVblankStart();
+ return 0;
+}
+