X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Fhost.c;h=a6c285637831ee85366574f1e65ac79a0ea2a473;hp=7df4f1092d75621742b6f9b71660858a8f69ea3b;hb=7868435641e4209e956a591ff0844afc14f83f16;hpb=f01759de2aca10619ab74e6f2cda92a7799e6234 diff --git a/loader/host.c b/loader/host.c index 7df4f10..a6c2856 100644 --- a/loader/host.c +++ b/loader/host.c @@ -26,9 +26,6 @@ #include "host_wiz.c" #endif -// for plat.c -char **g_argv; - int host_init(void) { in_init(); @@ -48,7 +45,7 @@ int host_read_btns(void) return actions[IN_BINDTYPE_PLAYER12]; } -void host_forced_exit(void) +void host_forced_exit(int status) { // exit() might not be enough because loader and app data is out of sync, // and other threads (which are really processes on this old glibc used) @@ -62,7 +59,7 @@ void host_forced_exit(void) usleep(300000); snprintf(cmd, sizeof(cmd), "killall -9 %s", g_argv[0]); system(cmd); - exit(1); + exit(status); } // vim:shiftwidth=2:expandtab