- /* Finish processing all events (namely APP_CMD_DESTROY) before
- exiting thread */
- while (!app->destroyRequested)
- fgPlatformProcessSingleEvent();
-
- /* In theory we should let NativeActivity restart us, however this
- doesn't work well yet, so force exit */
- exit(0);
+ /* Let NativeActivity restart us */
+ /* Users may want to forcibly exit() in their main() anyway because
+ NativeActivity doesn't dlclose() us, so all statically-assigned
+ variables keep their old values on restart.. */