Skip to content

Commit

Permalink
Buildfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Dec 27, 2024
1 parent 18c85b5 commit b8cdaea
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions retroarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -4303,34 +4303,38 @@ bool command_event(enum event_command cmd, void *data)
break;
#endif
case CMD_EVENT_SHUTDOWN:
{
#if defined(__linux__) && !defined(ANDROID)
const char *_msg = msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN);
if (settings->bools.config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
const char *_msg = msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN);
if (settings->bools.config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
#ifdef HAVE_LAKKA
system("nohup /usr/bin/lakka-shutdown.sh 2>&1 >/dev/null & exit");
system("nohup /usr/bin/lakka-shutdown.sh 2>&1 >/dev/null & exit");
#else
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -P now");
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -P now");
#endif /* HAVE_LAKKA */
#endif
}
break;
case CMD_EVENT_REBOOT:
{
#if defined(__linux__) && !defined(ANDROID)
const char *_msg = msg_hash_to_str(MSG_VALUE_REBOOTING);
if (settings->bools.config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
const char *_msg = msg_hash_to_str(MSG_VALUE_REBOOTING);
if (settings->bools.config_save_on_exit)
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
runloop_msg_queue_push(_msg, strlen(_msg), 1, 180, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
#ifdef HAVE_LAKKA
system("nohup /usr/bin/lakka-reboot.sh 2>&1 >/dev/null & exit");
system("nohup /usr/bin/lakka-reboot.sh 2>&1 >/dev/null & exit");
#else
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -r now");
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -r now");
#endif /* HAVE_LAKKA */
#endif
}
break;
case CMD_EVENT_RESUME:
#ifdef HAVE_MENU
Expand Down

0 comments on commit b8cdaea

Please sign in to comment.