mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Lakka: use different shutdown/reboot system commands
To avoid any filesystem corruption during shutdown/reboot a sleep is
added before shutdown/reboot is called. Also no quit is called, as the
RetroArch process will be killed by systemd. Quitting RetroArch may
result in unwanted restart of RetroArch by systemd.
Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-02-graceful-shutdown-reboot-hack.patch
This commit is contained in:
parent
0867227293
commit
be92517b16
@ -4727,8 +4727,12 @@ bool command_event(enum event_command cmd, void *data)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
}
|
||||
#ifdef HAVE_LAKKA
|
||||
system("(sleep 1 && shutdown -P now) & disown");
|
||||
#else
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
system("shutdown -P now");
|
||||
#endif /* HAVE_LAKKA */
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_REBOOT:
|
||||
@ -4738,8 +4742,12 @@ bool command_event(enum event_command cmd, void *data)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
}
|
||||
#ifdef HAVE_LAKKA
|
||||
system("(sleep 1 && shutdown -r now) & disown");
|
||||
#else
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
system("shutdown -r now");
|
||||
#endif /* HAVE_LAKKA */
|
||||
#endif
|
||||
break;
|
||||
case CMD_EVENT_RESUME:
|
||||
|
Loading…
x
Reference in New Issue
Block a user