Skip to content

Commit

Permalink
revert shutdown fix for now
Browse files Browse the repository at this point in the history
it was causing quicksaves not saving and needs further investigation
  • Loading branch information
anzz1 authored May 30, 2023
1 parent d716dde commit 4fb4cfb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,17 +894,13 @@ int preventAutosleep(void) {

void powerOff(void) {
if (can_poweroff) {
pid_t pid = -1;
char* msg = exists(kAutoResumePath) ? "Quicksave created,\npowering off" : "Powering off";
SDL_FillRect(screen, NULL, 0);
GFX_blitBodyCopy(screen, msg, 0,0,Screen.width,Screen.height);
SDL_Flip(screen);
sleep(1);
while (pid < 0) {
pid = vfork();
}
if (pid == 0) execlp("shutdown", "shutdown", NULL);
_exit(0);
system("shutdown");
while (1) pause();
}
}

Expand Down

0 comments on commit 4fb4cfb

Please sign in to comment.