Fixup PS2/PSP SDL_RunApp()

Make PS2/PSP use the mainFunction argument for SDL_RunApp().

Make PSP SDL_RunApp() return the value from mainFunction().

Make PS2 SDL_RunApp() call SDL_SetMainReady() like all other
SDL_RunApp() functions. (It doesn't affect anything for PS2 as
SDL_MAIN_NEEDED isn't defined.)
This commit is contained in:
Zack Middleton 2022-12-17 23:12:48 -06:00 committed by Sam Lantinga
parent 87a24ba765
commit e512809246
2 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,9 @@ SDL_RunApp(int argc, char* argv[], SDL_main_func mainFunction, void * reserved)
getcwd(cwd, sizeof(cwd));
waitUntilDeviceIsReady(cwd);
res = SDL_main(argc, argv);
SDL_SetMainReady();
res = mainFunction(argc, argv);
deinit_drivers();

View File

@ -76,8 +76,7 @@ SDL_RunApp(int argc, char* argv[], SDL_main_func mainFunction, void * reserved)
SDL_SetMainReady();
(void)SDL_main(argc, argv);
return 0;
return mainFunction(argc, argv);
}
#endif /* __PSP__ */