Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -156,20 +156,23 @@ return [app environment]; } + (void)terminate { - exit(0); + [self terminateWithStatus: EXIT_SUCCESS]; + + OF_UNREACHABLE } + (void)terminateWithStatus: (int)status { -#ifdef OF_PSP +#ifndef OF_PSP + exit(status); +#else sceKernelExitGame(); - abort(); /* sceKernelExitGame() is not marked noreturn */ -#else - exit(status); + + OF_UNREACHABLE #endif } - init { @@ -474,13 +477,17 @@ [runLoop run]; } - (void)terminate { - exit(EXIT_SUCCESS); + [[self class] terminate]; + + OF_UNREACHABLE } - (void)terminateWithStatus: (int)status { - exit(status); + [[self class] terminateWithStatus: status]; + + OF_UNREACHABLE } @end