@@ -78,11 +78,17 @@ if (rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync(); CON_InitEx(rmode, 10, 20, rmode->fbWidth - 10, rmode->xfbHeight - 20); VIDEO_ClearFrameBuffer(rmode, xfb, COLOR_BLACK); +#endif + +#ifdef _PSP + pspDebugScreenInit(); +#endif +#if defined(__wii__) || defined(_PSP) @try { return of_application_main(&argc, &argv, [TestsAppDelegate class]); } @catch (id e) { TestsAppDelegate *delegate = @@ -97,17 +103,20 @@ inColor: RED]; [delegate outputString: backtrace inColor: RED]; [delegate outputString: @"Press home button to exit!\n" inColor: NO_COLOR]; + for (;;) { +# ifdef __wii__ WPAD_ScanPads(); if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) [OFApplication terminateWithStatus: 1]; VIDEO_WaitVSync(); +# endif } } #else return of_application_main(&argc, &argv, [TestsAppDelegate class]); #endif @@ -124,18 +133,21 @@ pspDebugScreenSetXY(0, y); for (i = 0; i < 68; i++) pspDebugScreenPrintData(&space, 1); switch (color) { - case 0: - pspDebugScreenSetTextColor(0x00FFFF); + case NO_COLOR: + pspDebugScreenSetTextColor(0xFFFFFF); + break; + case RED: + pspDebugScreenSetTextColor(0x0000FF); break; - case 1: + case GREEN: pspDebugScreenSetTextColor(0x00FF00); break; - case 2: - pspDebugScreenSetTextColor(0x0000FF); + case YELLOW: + pspDebugScreenSetTextColor(0x00FFFF); break; } pspDebugScreenSetXY(0, y); pspDebugScreenPrintData([str UTF8String], [str UTF8StringLength]); @@ -208,13 +220,10 @@ #endif } - (void)applicationDidFinishLaunching { -#ifdef _PSP - pspDebugScreenInit(); -#endif #ifdef __wii__ [OFFile changeToDirectoryAtPath: @"/apps/objfw-tests"]; #endif [self objectTests];