mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
add restart menu option
add sublabels Add .gitlab-ci.yml Update .gitlab-ci.yml
This commit is contained in:
parent
eef4ada025
commit
95dbb040b0
8
.gitlab-ci.yml
Normal file
8
.gitlab-ci.yml
Normal file
@ -0,0 +1,8 @@
|
||||
before_script:
|
||||
- apt-get update -qq && apt-get install -y -qq git build-essential
|
||||
- apt-get update -qq && apt-get build-dep -y retroarch
|
||||
|
||||
build:
|
||||
script:
|
||||
- ./configure
|
||||
- make -j2
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <compat/strl.h>
|
||||
@ -43,7 +45,7 @@
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../ui/drivers/ui_win32.h"
|
||||
|
||||
#include "../../paths.h"
|
||||
#ifndef SM_SERVERR2
|
||||
#define SM_SERVERR2 89
|
||||
#endif
|
||||
@ -635,14 +637,61 @@ enum retro_language frontend_win32_get_user_language(void)
|
||||
return lang;
|
||||
}
|
||||
|
||||
enum frontend_fork win32_fork_mode;
|
||||
|
||||
void frontend_win32_respawn(char *s, size_t len)
|
||||
{
|
||||
if (win32_fork_mode != FRONTEND_FORK_RESTART)
|
||||
return;
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
ZeroMemory( &si, sizeof(si) );
|
||||
si.cb = sizeof(si);
|
||||
ZeroMemory( &pi, sizeof(pi) );
|
||||
|
||||
char executable_path[PATH_MAX_LENGTH] = {0};
|
||||
fill_pathname_application_path(executable_path,
|
||||
sizeof(executable_path));
|
||||
path_set(RARCH_PATH_CORE, executable_path);
|
||||
RARCH_LOG("Restarting RetroArch with commandline: %s and %s\n",
|
||||
executable_path, get_retroarch_launch_arguments());
|
||||
|
||||
if(!CreateProcess( executable_path, get_retroarch_launch_arguments(),
|
||||
NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
|
||||
{
|
||||
RARCH_LOG("Failed to restart RetroArch\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool frontend_win32_set_fork(enum frontend_fork fork_mode)
|
||||
{
|
||||
switch (fork_mode)
|
||||
{
|
||||
case FRONTEND_FORK_CORE:
|
||||
break;
|
||||
case FRONTEND_FORK_CORE_WITH_ARGS:
|
||||
break;
|
||||
case FRONTEND_FORK_RESTART:
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
break;
|
||||
case FRONTEND_FORK_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
win32_fork_mode = fork_mode;
|
||||
return true;
|
||||
}
|
||||
|
||||
frontend_ctx_driver_t frontend_ctx_win32 = {
|
||||
frontend_win32_environment_get,
|
||||
frontend_win32_init,
|
||||
NULL, /* deinit */
|
||||
NULL, /* exitspawn */
|
||||
frontend_win32_respawn, /* exitspawn */
|
||||
NULL, /* process_args */
|
||||
NULL, /* exec */
|
||||
NULL, /* set_fork */
|
||||
frontend_win32_set_fork, /* set_fork */
|
||||
NULL, /* shutdown */
|
||||
NULL, /* get_name */
|
||||
frontend_win32_get_os,
|
||||
|
@ -5455,6 +5455,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
|
||||
"Quit the program."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_RESTART_RETROARCH,
|
||||
"Restart the program."
|
||||
)
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
|
||||
|
@ -241,6 +241,7 @@ default_sublabel_macro(action_bind_sublabel_content_special, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_network_information, MENU_ENUM_SUBLABEL_NETWORK_INFORMATION)
|
||||
default_sublabel_macro(action_bind_sublabel_system_information, MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION)
|
||||
default_sublabel_macro(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_QUIT_RETROARCH)
|
||||
default_sublabel_macro(action_bind_sublabel_restart_retroarch, MENU_ENUM_SUBLABEL_RESTART_RETROARCH)
|
||||
default_sublabel_macro(action_bind_sublabel_video_window_width, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH)
|
||||
default_sublabel_macro(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
|
||||
default_sublabel_macro(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
|
||||
@ -2035,6 +2036,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_QUIT_RETROARCH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quit_retroarch);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RESTART_RETROARCH:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_restart_retroarch);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETWORK_INFORMATION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_network_information);
|
||||
break;
|
||||
|
@ -902,6 +902,12 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
}
|
||||
|
||||
#if !defined(IOS)
|
||||
if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork())
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
|
||||
if (settings->bools.menu_show_quit_retroarch)
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
||||
|
@ -5666,13 +5666,18 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
}
|
||||
|
||||
#if !defined(IOS)
|
||||
if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork())
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
|
||||
if (settings->bools.menu_show_quit_retroarch)
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (settings->bools.menu_show_reboot)
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
|
||||
|
@ -6879,6 +6879,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
MENU_ENUM_LABEL_HELP_LIST,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork())
|
||||
if (menu_displaylist_parse_settings_enum(info->list,
|
||||
MENU_ENUM_LABEL_RESTART_RETROARCH,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_show_quit_retroarch)
|
||||
if (menu_displaylist_parse_settings_enum(info->list,
|
||||
MENU_ENUM_LABEL_QUIT_RETROARCH,
|
||||
|
@ -6765,6 +6765,14 @@ static bool setting_append_list(
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_QUIT);
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
MENU_ENUM_LABEL_RESTART_RETROARCH,
|
||||
MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_RESTART_RETROARCH);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
|
||||
|
@ -1682,6 +1682,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CLOSE_CONTENT),
|
||||
MENU_LABEL(SHOW_WIMP),
|
||||
MENU_LABEL(QUIT_RETROARCH),
|
||||
MENU_LABEL(RESTART_RETROARCH),
|
||||
MENU_LABEL(SHUTDOWN),
|
||||
MENU_LABEL(REBOOT),
|
||||
MENU_LABEL(DISK_IMAGE_APPEND),
|
||||
@ -1832,7 +1833,6 @@ enum msg_hash_enums
|
||||
MENU_LABEL(CHEAT_FILE_SAVE_AS),
|
||||
MENU_LABEL(DELETE_ENTRY),
|
||||
MENU_LABEL(RENAME_ENTRY),
|
||||
MENU_LABEL(RESTART_RETROARCH),
|
||||
|
||||
MENU_LABEL(TAKE_SCREENSHOT),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user