|
@@ -7,11 +7,12 @@
|
|
|
|
|
|
#include "SDL_main.h"
|
|
|
#include <pspkernel.h>
|
|
|
-#include <pspdebug.h>
|
|
|
-#include <pspsdk.h>
|
|
|
#include <pspthreadman.h>
|
|
|
#include <stdlib.h>
|
|
|
-#include <stdio.h>
|
|
|
+
|
|
|
+#ifdef main
|
|
|
+ #undef main
|
|
|
+#endif
|
|
|
|
|
|
/* If application's main() is redefined as SDL_main, and libSDLmain is
|
|
|
linked, then this file will create the standard exit callback,
|
|
@@ -23,11 +24,12 @@
|
|
|
PSP_MAIN_THREAD_STACK_SIZE, etc.
|
|
|
*/
|
|
|
|
|
|
-PSP_MODULE_INFO("SDL App", 0, 1, 1);
|
|
|
+PSP_MODULE_INFO("SDL App", 0, 1, 0);
|
|
|
+PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU | THREAD_ATTR_USER);
|
|
|
|
|
|
int sdl_psp_exit_callback(int arg1, int arg2, void *common)
|
|
|
{
|
|
|
- exit(0);
|
|
|
+ sceKernelExitGame();
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -53,12 +55,8 @@ int sdl_psp_setup_callbacks(void)
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
|
- pspDebugScreenInit();
|
|
|
sdl_psp_setup_callbacks();
|
|
|
|
|
|
- /* Register sceKernelExitGame() to be called when we exit */
|
|
|
- atexit(sceKernelExitGame);
|
|
|
-
|
|
|
SDL_SetMainReady();
|
|
|
|
|
|
(void)SDL_main(argc, argv);
|