Skip to content

Commit

Permalink
CD Based games can't autosave/resume #7
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Xpndable committed Apr 2, 2023
1 parent 6892609 commit 0c9acdb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion skeleton/.system/bin/shutdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
if [ -n "$DATETIME_PATH" ]; then
echo `date +'%F %T'` > "$DATETIME_PATH"
fi
sync && reboot && sleep 10
sync && poweroff && sleep 10
2 changes: 1 addition & 1 deletion src/batmon/batmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int main(void) {
close(fb0_fd);

if (!launch) {
system("poweroff");
system("shutdown");
while (1) pause();
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
2 changes: 1 addition & 1 deletion src/keymon/keymon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 0c9acdb

Please sign in to comment.