X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=loader%2Fhost_pnd.c;h=32fe95a95010d6b8118732500f4d0ef242481e5b;hb=cc559d92a3578536dcd7a499751ae97aa6d409d7;hp=9064047de6703aebaad31df2dc60e2d48e1a84e0;hpb=4d0451847a77d420284c7fb0f50b1f167c1118ee;p=ginge.git diff --git a/loader/host_pnd.c b/loader/host_pnd.c index 9064047..32fe95a 100644 --- a/loader/host_pnd.c +++ b/loader/host_pnd.c @@ -76,7 +76,7 @@ static const struct { { BTN_SELECT, GP2X_SELECT }, { KEY_COMMA, GP2X_VOL_DOWN }, { KEY_DOT, GP2X_VOL_UP }, - { KEY_Q, GP2X_PUSH }, + { KEY_1, GP2X_PUSH }, }; int host_read_btns(void) @@ -103,6 +103,15 @@ int host_read_btns(void) if (ev.type != EV_KEY) continue; + if (ev.code == KEY_Q && ev.value) { + // exit() might not be enough because loader and app data is out of sync, + // and other threads (which are really processes) might not exit properly. + system("killall ginge_sloader"); + usleep(300000); + system("killall -9 ginge_sloader"); + exit(1); + } + for (i = 0; i < sizeof(key_map) / sizeof(key_map[0]); i++) { if (key_map[i].key != ev.code) continue;