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:
committed by
Sam Lantinga
parent
87a24ba765
commit
e512809246
@@ -96,7 +96,9 @@ SDL_RunApp(int argc, char* argv[], SDL_main_func mainFunction, void * reserved)
|
|||||||
getcwd(cwd, sizeof(cwd));
|
getcwd(cwd, sizeof(cwd));
|
||||||
waitUntilDeviceIsReady(cwd);
|
waitUntilDeviceIsReady(cwd);
|
||||||
|
|
||||||
res = SDL_main(argc, argv);
|
SDL_SetMainReady();
|
||||||
|
|
||||||
|
res = mainFunction(argc, argv);
|
||||||
|
|
||||||
deinit_drivers();
|
deinit_drivers();
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ SDL_RunApp(int argc, char* argv[], SDL_main_func mainFunction, void * reserved)
|
|||||||
|
|
||||||
SDL_SetMainReady();
|
SDL_SetMainReady();
|
||||||
|
|
||||||
(void)SDL_main(argc, argv);
|
return mainFunction(argc, argv);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __PSP__ */
|
#endif /* __PSP__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user