From 0c9acdb637ec81386f82fa7997dd17e6cc17120e Mon Sep 17 00:00:00 2001 From: Xpndable Date: Sun, 2 Apr 2023 12:43:44 +1000 Subject: [PATCH] CD Based games can't autosave/resume #7 doesn't fix the issue specific issues that were found, those are pre-existing from MiniUI, but ensures datetime recorded, and sync is performed prior to poweroff for write security. probably need swap file to prevent segfault found on segacd autoresume --- skeleton/.system/bin/shutdown | 2 +- src/batmon/batmon.c | 2 +- src/common/common.c | 2 +- src/keymon/keymon.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/skeleton/.system/bin/shutdown b/skeleton/.system/bin/shutdown index 3477e7d..7f079ee 100755 --- a/skeleton/.system/bin/shutdown +++ b/skeleton/.system/bin/shutdown @@ -3,4 +3,4 @@ if [ -n "$DATETIME_PATH" ]; then echo `date +'%F %T'` > "$DATETIME_PATH" fi -sync && reboot && sleep 10 \ No newline at end of file +sync && poweroff && sleep 10 \ No newline at end of file diff --git a/src/batmon/batmon.c b/src/batmon/batmon.c index 25663a5..e8d61e2 100644 --- a/src/batmon/batmon.c +++ b/src/batmon/batmon.c @@ -107,7 +107,7 @@ int main(void) { close(fb0_fd); if (!launch) { - system("poweroff"); + system("shutdown"); while (1) pause(); } diff --git a/src/common/common.c b/src/common/common.c index ae341eb..d62933c 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -856,7 +856,7 @@ void powerOff(void) { GFX_blitBodyCopy(screen, msg, 0,0,Screen.width,Screen.height); SDL_Flip(screen); sleep(1); - system("poweroff"); + system("shutdown"); while (1) pause(); } } \ No newline at end of file diff --git a/src/keymon/keymon.c b/src/keymon/keymon.c index a5c2fe1..e66091d 100644 --- a/src/keymon/keymon.c +++ b/src/keymon/keymon.c @@ -217,7 +217,7 @@ int main (int argc, char *argv[]) { if (menu_pressed && power_pressed) { menu_pressed = power_pressed = 0; - system("poweroff"); + system("shutdown"); while (1) pause(); } }