mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 15:32:01 +00:00
Rename RARCH_CMD_* to EVENT_CMD_*
This commit is contained in:
parent
c0d88e19d1
commit
de2eb5f972
@ -256,7 +256,7 @@ static void poll_iteration(void)
|
||||
if (global && global->main_is_init)
|
||||
reply = NSTerminateCancel;
|
||||
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
|
||||
return reply;
|
||||
}
|
||||
@ -274,7 +274,7 @@ static void poll_iteration(void)
|
||||
strlcpy(global->fullpath, __core.UTF8String, sizeof(global->fullpath));
|
||||
|
||||
if (core_name)
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CONTENT);
|
||||
else
|
||||
[self chooseCore];
|
||||
|
||||
@ -306,7 +306,7 @@ static void poll_iteration(void)
|
||||
strlcpy(global->fullpath, __core.UTF8String, sizeof(global->fullpath));
|
||||
|
||||
if (core_name)
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CONTENT);
|
||||
else
|
||||
[self performSelector:@selector(chooseCore) withObject:nil afterDelay:.5f];
|
||||
}
|
||||
@ -346,11 +346,11 @@ static void poll_iteration(void)
|
||||
if (global && !global->main_is_init)
|
||||
{
|
||||
/* TODO/FIXME: Set core/content here. */
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CONTENT);
|
||||
}
|
||||
else
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
}
|
||||
|
||||
#pragma mark RetroArch_Platform
|
||||
@ -388,37 +388,37 @@ static void poll_iteration(void)
|
||||
switch (sender_tag)
|
||||
{
|
||||
case 1:
|
||||
cmd = RARCH_CMD_RESET;
|
||||
cmd = EVENT_CMD_RESET;
|
||||
break;
|
||||
case 2:
|
||||
cmd = RARCH_CMD_LOAD_STATE;
|
||||
cmd = EVENT_CMD_LOAD_STATE;
|
||||
break;
|
||||
case 3:
|
||||
cmd = RARCH_CMD_SAVE_STATE;
|
||||
cmd = EVENT_CMD_SAVE_STATE;
|
||||
break;
|
||||
case 4:
|
||||
cmd = RARCH_CMD_DISK_EJECT_TOGGLE;
|
||||
cmd = EVENT_CMD_DISK_EJECT_TOGGLE;
|
||||
break;
|
||||
case 5:
|
||||
cmd = RARCH_CMD_DISK_PREV;
|
||||
cmd = EVENT_CMD_DISK_PREV;
|
||||
break;
|
||||
case 6:
|
||||
cmd = RARCH_CMD_DISK_NEXT;
|
||||
cmd = EVENT_CMD_DISK_NEXT;
|
||||
break;
|
||||
case 7:
|
||||
cmd = RARCH_CMD_GRAB_MOUSE_TOGGLE;
|
||||
cmd = EVENT_CMD_GRAB_MOUSE_TOGGLE;
|
||||
break;
|
||||
case 8:
|
||||
cmd = RARCH_CMD_MENU_TOGGLE;
|
||||
cmd = EVENT_CMD_MENU_TOGGLE;
|
||||
break;
|
||||
case 9:
|
||||
cmd = RARCH_CMD_PAUSE_TOGGLE;
|
||||
cmd = EVENT_CMD_PAUSE_TOGGLE;
|
||||
break;
|
||||
case 20:
|
||||
cmd = RARCH_CMD_FULLSCREEN_TOGGLE;
|
||||
cmd = EVENT_CMD_FULLSCREEN_TOGGLE;
|
||||
break;
|
||||
default:
|
||||
cmd = RARCH_CMD_NONE;
|
||||
cmd = EVENT_CMD_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ static void poll_iteration(void)
|
||||
{
|
||||
unsigned idx = (sender_tag - (10-1));
|
||||
global->pending.windowed_scale = idx;
|
||||
cmd = RARCH_CMD_RESIZE_WINDOWED_SCALE;
|
||||
cmd = EVENT_CMD_RESIZE_WINDOWED_SCALE;
|
||||
}
|
||||
|
||||
rarch_main_command(cmd);
|
||||
|
@ -279,7 +279,7 @@ void uninit_audio(void)
|
||||
free(global->audio_data.outsamples);
|
||||
global->audio_data.outsamples = NULL;
|
||||
|
||||
rarch_main_command(RARCH_CMD_DSP_FILTER_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_DSP_FILTER_DEINIT);
|
||||
|
||||
compute_audio_buffer_statistics();
|
||||
}
|
||||
@ -363,7 +363,7 @@ void init_audio(void)
|
||||
|
||||
if (!settings->audio.sync && driver->audio_active)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE);
|
||||
global->audio_data.chunk_size =
|
||||
global->audio_data.nonblock_chunk_size;
|
||||
}
|
||||
@ -421,7 +421,7 @@ void init_audio(void)
|
||||
RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n");
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_DSP_FILTER_INIT);
|
||||
rarch_main_command(EVENT_CMD_DSP_FILTER_INIT);
|
||||
|
||||
runloop->measure_data.buffer_free_samples_count = 0;
|
||||
|
||||
@ -460,8 +460,8 @@ bool audio_driver_mute_toggle(void)
|
||||
settings->audio.mute_enable = !settings->audio.mute_enable;
|
||||
|
||||
if (settings->audio.mute_enable)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_STOP);
|
||||
else if (!rarch_main_command(RARCH_CMD_AUDIO_START))
|
||||
rarch_main_command(EVENT_CMD_AUDIO_STOP);
|
||||
else if (!rarch_main_command(EVENT_CMD_AUDIO_START))
|
||||
{
|
||||
driver->audio_active = false;
|
||||
return false;
|
||||
|
8
driver.c
8
driver.c
@ -244,7 +244,7 @@ static void driver_adjust_system_rates(void)
|
||||
return;
|
||||
|
||||
if (global->system.force_nonblock)
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE);
|
||||
else
|
||||
driver_set_nonblock_state(driver->nonblock_state);
|
||||
}
|
||||
@ -313,7 +313,7 @@ bool driver_update_system_av_info(const struct retro_system_av_info *info)
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
global->system.av_info = *info;
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
|
||||
/* Cannot continue recording with different parameters.
|
||||
* Take the easiest route out and just restart the recording. */
|
||||
@ -322,8 +322,8 @@ bool driver_update_system_av_info(const struct retro_system_av_info *info)
|
||||
static const char *msg = "Restarting recording due to driver reinit.";
|
||||
rarch_main_msg_queue_push(msg, 2, 180, false);
|
||||
RARCH_WARN("%s\n", msg);
|
||||
rarch_main_command(RARCH_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_RECORD_INIT);
|
||||
rarch_main_command(EVENT_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_RECORD_INIT);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
2
driver.h
2
driver.h
@ -178,7 +178,7 @@ enum
|
||||
DRIVERS_VIDEO_INPUT = 1 << 6
|
||||
};
|
||||
|
||||
/* Drivers for RARCH_CMD_DRIVERS_DEINIT and RARCH_CMD_DRIVERS_INIT */
|
||||
/* Drivers for EVENT_CMD_DRIVERS_DEINIT and EVENT_CMD_DRIVERS_INIT */
|
||||
#define DRIVERS_CMD_ALL \
|
||||
( DRIVER_AUDIO \
|
||||
| DRIVER_VIDEO \
|
||||
|
@ -1122,7 +1122,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
/* Forces recomputation of aspect ratios if
|
||||
* using core-dependent aspect ratios. */
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
|
||||
/* TODO: Figure out what to do, if anything, with recording. */
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ void engine_handle_cmd(void *data)
|
||||
slock_unlock(android_app->mutex);
|
||||
|
||||
if (runloop->is_paused)
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
break;
|
||||
|
||||
case APP_CMD_RESUME:
|
||||
|
@ -70,7 +70,7 @@ void main_exit_save_config(void)
|
||||
config_save_file(global->core_specific_config_path);
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_STATE);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_STATE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,7 +102,7 @@ void main_exit(args_type() args)
|
||||
rarch_main_deinit();
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_PERFCNT_REPORT_FRONTEND_LOG);
|
||||
rarch_main_command(EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG);
|
||||
|
||||
#if defined(HAVE_LOGGER) && !defined(ANDROID)
|
||||
logger_shutdown();
|
||||
@ -264,7 +264,7 @@ bool main_load_content(int argc, char **argv, args_type() args,
|
||||
goto error;
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_RESUME);
|
||||
rarch_main_command(EVENT_CMD_RESUME);
|
||||
|
||||
if (process_args)
|
||||
process_args(rarch_argc_ptr, rarch_argv_ptr);
|
||||
@ -321,7 +321,7 @@ returntype main_entry(signature())
|
||||
}
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_HISTORY_INIT);
|
||||
rarch_main_command(EVENT_CMD_HISTORY_INIT);
|
||||
|
||||
settings = config_get_ptr();
|
||||
|
||||
|
@ -60,7 +60,7 @@ static bool win32_browser(
|
||||
LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
{
|
||||
WPARAM mode = wparam & 0xffff;
|
||||
unsigned cmd = RARCH_CMD_NONE;
|
||||
unsigned cmd = EVENT_CMD_NONE;
|
||||
bool do_wm_close = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
@ -96,11 +96,11 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
{
|
||||
case ID_M_LOAD_CORE:
|
||||
strlcpy(settings->libretro, win32_file, sizeof(settings->libretro));
|
||||
cmd = RARCH_CMD_LOAD_CORE;
|
||||
cmd = EVENT_CMD_LOAD_CORE;
|
||||
break;
|
||||
case ID_M_LOAD_CONTENT:
|
||||
strlcpy(global->fullpath, win32_file, sizeof(global->fullpath));
|
||||
cmd = RARCH_CMD_LOAD_CONTENT;
|
||||
cmd = EVENT_CMD_LOAD_CONTENT;
|
||||
do_wm_close = true;
|
||||
break;
|
||||
}
|
||||
@ -108,34 +108,34 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
}
|
||||
break;
|
||||
case ID_M_RESET:
|
||||
cmd = RARCH_CMD_RESET;
|
||||
cmd = EVENT_CMD_RESET;
|
||||
break;
|
||||
case ID_M_MUTE_TOGGLE:
|
||||
cmd = RARCH_CMD_AUDIO_MUTE_TOGGLE;
|
||||
cmd = EVENT_CMD_AUDIO_MUTE_TOGGLE;
|
||||
break;
|
||||
case ID_M_MENU_TOGGLE:
|
||||
cmd = RARCH_CMD_MENU_TOGGLE;
|
||||
cmd = EVENT_CMD_MENU_TOGGLE;
|
||||
break;
|
||||
case ID_M_PAUSE_TOGGLE:
|
||||
cmd = RARCH_CMD_PAUSE_TOGGLE;
|
||||
cmd = EVENT_CMD_PAUSE_TOGGLE;
|
||||
break;
|
||||
case ID_M_LOAD_STATE:
|
||||
cmd = RARCH_CMD_LOAD_STATE;
|
||||
cmd = EVENT_CMD_LOAD_STATE;
|
||||
break;
|
||||
case ID_M_SAVE_STATE:
|
||||
cmd = RARCH_CMD_SAVE_STATE;
|
||||
cmd = EVENT_CMD_SAVE_STATE;
|
||||
break;
|
||||
case ID_M_DISK_CYCLE:
|
||||
cmd = RARCH_CMD_DISK_EJECT_TOGGLE;
|
||||
cmd = EVENT_CMD_DISK_EJECT_TOGGLE;
|
||||
break;
|
||||
case ID_M_DISK_NEXT:
|
||||
cmd = RARCH_CMD_DISK_NEXT;
|
||||
cmd = EVENT_CMD_DISK_NEXT;
|
||||
break;
|
||||
case ID_M_DISK_PREV:
|
||||
cmd = RARCH_CMD_DISK_PREV;
|
||||
cmd = EVENT_CMD_DISK_PREV;
|
||||
break;
|
||||
case ID_M_FULL_SCREEN:
|
||||
cmd = RARCH_CMD_FULLSCREEN_TOGGLE;
|
||||
cmd = EVENT_CMD_FULLSCREEN_TOGGLE;
|
||||
break;
|
||||
#ifdef HAVE_OPENGL
|
||||
case ID_M_SHADER_PARAMETERS:
|
||||
@ -143,10 +143,10 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
break;
|
||||
#endif
|
||||
case ID_M_MOUSE_GRAB:
|
||||
cmd = RARCH_CMD_GRAB_MOUSE_TOGGLE;
|
||||
cmd = EVENT_CMD_GRAB_MOUSE_TOGGLE;
|
||||
break;
|
||||
case ID_M_TAKE_SCREENSHOT:
|
||||
cmd = RARCH_CMD_TAKE_SCREENSHOT;
|
||||
cmd = EVENT_CMD_TAKE_SCREENSHOT;
|
||||
break;
|
||||
case ID_M_QUIT:
|
||||
do_wm_close = true;
|
||||
@ -156,7 +156,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
{
|
||||
unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1));
|
||||
global->pending.windowed_scale = idx;
|
||||
cmd = RARCH_CMD_RESIZE_WINDOWED_SCALE;
|
||||
cmd = EVENT_CMD_RESIZE_WINDOWED_SCALE;
|
||||
}
|
||||
else if (mode == ID_M_STATE_INDEX_AUTO)
|
||||
{
|
||||
@ -171,7 +171,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_CMD_NONE)
|
||||
if (cmd != EVENT_CMD_NONE)
|
||||
rarch_main_command(cmd);
|
||||
|
||||
if (do_wm_close)
|
||||
|
@ -237,14 +237,14 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
|
||||
if(!aptMainLoop())
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
goto end;
|
||||
}
|
||||
|
||||
extern bool select_pressed;
|
||||
if (select_pressed)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ void uninit_video_input(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_DEINIT);
|
||||
|
||||
if (
|
||||
!driver->input_data_own &&
|
||||
@ -419,7 +419,7 @@ void uninit_video_input(void)
|
||||
|
||||
deinit_video_filter();
|
||||
|
||||
rarch_main_command(RARCH_CMD_SHADER_DIR_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SHADER_DIR_DEINIT);
|
||||
video_monitor_compute_fps_statistics();
|
||||
}
|
||||
|
||||
@ -439,7 +439,7 @@ void init_video(void)
|
||||
runloop->frames.video.count = 0;
|
||||
|
||||
init_video_filter(global->system.pix_fmt);
|
||||
rarch_main_command(RARCH_CMD_SHADER_DIR_INIT);
|
||||
rarch_main_command(EVENT_CMD_SHADER_DIR_INIT);
|
||||
|
||||
geom = (const struct retro_game_geometry*)&global->system.av_info.geometry;
|
||||
max_dim = max(geom->max_width, geom->max_height);
|
||||
@ -567,8 +567,8 @@ void init_video(void)
|
||||
if (!driver->input)
|
||||
init_video_input(tmp);
|
||||
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_INIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_INIT);
|
||||
|
||||
runloop->measure_data.frame_time_samples_count = 0;
|
||||
|
||||
|
@ -164,7 +164,7 @@ static void ctr_joypad_poll(void)
|
||||
(state_tmp & KEY_SELECT) &&
|
||||
(state_tmp & KEY_L) &&
|
||||
(state_tmp & KEY_R))
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
|
||||
}
|
||||
|
||||
|
12
menu/menu.c
12
menu/menu.c
@ -76,9 +76,9 @@ void menu_update_libretro_info(struct retro_system_info *info)
|
||||
retro_get_system_info(info);
|
||||
#endif
|
||||
|
||||
rarch_main_command(RARCH_CMD_CORE_INFO_INIT);
|
||||
rarch_main_command(EVENT_CMD_CORE_INFO_INIT);
|
||||
menu_driver_context_reset();
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE_PERSIST);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE_PERSIST);
|
||||
}
|
||||
|
||||
static void menu_environment_get(int *argc, char *argv[],
|
||||
@ -168,13 +168,13 @@ bool menu_load_content(void)
|
||||
|
||||
menu_shader_manager_init(driver->menu);
|
||||
|
||||
rarch_main_command(RARCH_CMD_HISTORY_INIT);
|
||||
rarch_main_command(EVENT_CMD_HISTORY_INIT);
|
||||
|
||||
if (*global->fullpath || (driver->menu && driver->menu->load_no_content))
|
||||
push_to_history_playlist();
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
rarch_main_command(RARCH_CMD_RESUME);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
rarch_main_command(EVENT_CMD_RESUME);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -310,7 +310,7 @@ void menu_free(void *data)
|
||||
menu_list_free(menu->menu_list);
|
||||
menu->menu_list = NULL;
|
||||
|
||||
rarch_main_command(RARCH_CMD_HISTORY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_HISTORY_DEINIT);
|
||||
|
||||
if (global->core_info)
|
||||
core_info_list_free(global->core_info);
|
||||
|
@ -33,7 +33,7 @@ void menu_entries_common_load_content(bool persist)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
rarch_main_command(persist ? RARCH_CMD_LOAD_CONTENT_PERSIST : RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(persist ? EVENT_CMD_LOAD_CONTENT_PERSIST : EVENT_CMD_LOAD_CONTENT);
|
||||
|
||||
menu_list_flush_stack(menu->menu_list, MENU_SETTINGS);
|
||||
menu->msg_force = true;
|
||||
|
@ -92,7 +92,7 @@ static int archive_load(void)
|
||||
switch (ret)
|
||||
{
|
||||
case -1:
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_entries_common_load_content(false);
|
||||
break;
|
||||
case 0:
|
||||
@ -461,7 +461,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
else if (custom->height >= (unsigned)stride_y)
|
||||
custom->height -= stride_y;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
break;
|
||||
|
||||
case MENU_ACTION_DOWN:
|
||||
@ -474,7 +474,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
else
|
||||
custom->height += stride_y;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
break;
|
||||
|
||||
case MENU_ACTION_LEFT:
|
||||
@ -486,7 +486,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
else if (custom->width >= (unsigned)stride_x)
|
||||
custom->width -= stride_x;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
break;
|
||||
|
||||
case MENU_ACTION_RIGHT:
|
||||
@ -499,7 +499,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
else
|
||||
custom->width += stride_x;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
break;
|
||||
|
||||
case MENU_ACTION_CANCEL:
|
||||
@ -543,7 +543,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
custom->height = vp.full_height - custom->y;
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -596,7 +596,7 @@ static int action_iterate_menu_viewport(const char *label, unsigned action)
|
||||
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
||||
(float)custom->width / custom->height;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ static int action_ok_core_updater_list(const char *path,
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
rarch_main_command(RARCH_CMD_NETWORK_INIT);
|
||||
rarch_main_command(EVENT_CMD_NETWORK_INIT);
|
||||
|
||||
fill_pathname_join(url_path, settings->network.buildbot_url,
|
||||
".index", sizeof(url_path));
|
||||
@ -387,7 +387,7 @@ static int action_ok_video_filter_file_load(const char *path,
|
||||
strlcpy(settings->video.softfilter_plugin, filter_path,
|
||||
sizeof(settings->video.softfilter_plugin));
|
||||
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
|
||||
menu_list_flush_stack_by_needle(menu->menu_list, "video_options");
|
||||
|
||||
@ -667,7 +667,7 @@ static int action_ok_core_load(const char *path,
|
||||
|
||||
fill_pathname_join(settings->libretro, menu_path, path,
|
||||
sizeof(settings->libretro));
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_list_flush_stack(menu->menu_list, MENU_SETTINGS);
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
/* No content needed for this core, load core immediately. */
|
||||
@ -683,7 +683,7 @@ static int action_ok_core_load(const char *path,
|
||||
/* Core selection on non-console just updates directory listing.
|
||||
* Will take effect on new content load. */
|
||||
#elif defined(RARCH_CONSOLE)
|
||||
rarch_main_command(RARCH_CMD_RESTART_RETROARCH);
|
||||
rarch_main_command(EVENT_CMD_RESTART_RETROARCH);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -818,7 +818,7 @@ static int action_ok_disk_image_append(const char *path,
|
||||
fill_pathname_join(image, menu_path, path, sizeof(image));
|
||||
rarch_disk_control_append_image(image);
|
||||
|
||||
rarch_main_command(RARCH_CMD_RESUME);
|
||||
rarch_main_command(EVENT_CMD_RESUME);
|
||||
|
||||
menu_list_flush_stack(menu->menu_list, MENU_SETTINGS);
|
||||
return -1;
|
||||
@ -845,7 +845,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_entries_common_load_content(false);
|
||||
return -1;
|
||||
}
|
||||
@ -951,7 +951,7 @@ static int action_ok_custom_viewport(const char *path,
|
||||
|
||||
settings->video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
|
||||
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -967,18 +967,18 @@ static int generic_action_ok_command(unsigned cmd)
|
||||
static int action_ok_load_state(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (generic_action_ok_command(RARCH_CMD_LOAD_STATE) == -1)
|
||||
if (generic_action_ok_command(EVENT_CMD_LOAD_STATE) == -1)
|
||||
return -1;
|
||||
return generic_action_ok_command(RARCH_CMD_RESUME);
|
||||
return generic_action_ok_command(EVENT_CMD_RESUME);
|
||||
}
|
||||
|
||||
|
||||
static int action_ok_save_state(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (generic_action_ok_command(RARCH_CMD_SAVE_STATE) == -1)
|
||||
if (generic_action_ok_command(EVENT_CMD_SAVE_STATE) == -1)
|
||||
return -1;
|
||||
return generic_action_ok_command(RARCH_CMD_RESUME);
|
||||
return generic_action_ok_command(EVENT_CMD_RESUME);
|
||||
}
|
||||
|
||||
static int action_ok_core_updater_download(const char *path,
|
||||
@ -1005,43 +1005,43 @@ static int action_ok_core_updater_download(const char *path,
|
||||
static int action_ok_disk_cycle_tray_status(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_DISK_EJECT_TOGGLE);
|
||||
return generic_action_ok_command(EVENT_CMD_DISK_EJECT_TOGGLE);
|
||||
}
|
||||
|
||||
static int action_ok_unload_core(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_UNLOAD_CORE);
|
||||
return generic_action_ok_command(EVENT_CMD_UNLOAD_CORE);
|
||||
}
|
||||
|
||||
static int action_ok_quit(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_QUIT);
|
||||
return generic_action_ok_command(EVENT_CMD_QUIT);
|
||||
}
|
||||
|
||||
static int action_ok_save_new_config(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_MENU_SAVE_CONFIG);
|
||||
return generic_action_ok_command(EVENT_CMD_MENU_SAVE_CONFIG);
|
||||
}
|
||||
|
||||
static int action_ok_resume_content(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_RESUME);
|
||||
return generic_action_ok_command(EVENT_CMD_RESUME);
|
||||
}
|
||||
|
||||
static int action_ok_restart_content(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_RESET);
|
||||
return generic_action_ok_command(EVENT_CMD_RESET);
|
||||
}
|
||||
|
||||
static int action_ok_screenshot(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_TAKE_SCREENSHOT);
|
||||
return generic_action_ok_command(EVENT_CMD_TAKE_SCREENSHOT);
|
||||
}
|
||||
|
||||
static int action_ok_file_load_or_resume(const char *path,
|
||||
@ -1054,12 +1054,12 @@ static int action_ok_file_load_or_resume(const char *path,
|
||||
return -1;
|
||||
|
||||
if (!strcmp(menu->deferred_path, global->fullpath))
|
||||
return generic_action_ok_command(RARCH_CMD_RESUME);
|
||||
return generic_action_ok_command(EVENT_CMD_RESUME);
|
||||
else
|
||||
{
|
||||
strlcpy(global->fullpath,
|
||||
menu->deferred_path, sizeof(global->fullpath));
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_LOAD_CONTENT);
|
||||
return -1;
|
||||
}
|
||||
@ -1068,7 +1068,7 @@ static int action_ok_file_load_or_resume(const char *path,
|
||||
static int action_ok_shader_apply_changes(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
return generic_action_ok_command(RARCH_CMD_SHADERS_APPLY_CHANGES);
|
||||
return generic_action_ok_command(EVENT_CMD_SHADERS_APPLY_CHANGES);
|
||||
}
|
||||
|
||||
static int action_ok_lookup_setting(const char *path,
|
||||
@ -1188,7 +1188,7 @@ static int action_ok_video_resolution(const char *path,
|
||||
global->console.screen.pal60_enable = false;
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
#else
|
||||
if (video_driver_get_video_output_size(&width, &height))
|
||||
video_driver_set_video_mode(width, height, true);
|
||||
|
@ -40,7 +40,7 @@ static int action_start_video_filter_file_load(unsigned type, const char *label,
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
settings->video.softfilter_plugin[0] = '\0';
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -479,10 +479,10 @@ static int disk_options_disk_idx_toggle(unsigned type, const char *label,
|
||||
switch (action)
|
||||
{
|
||||
case MENU_ACTION_LEFT:
|
||||
rarch_main_command(RARCH_CMD_DISK_PREV);
|
||||
rarch_main_command(EVENT_CMD_DISK_PREV);
|
||||
break;
|
||||
case MENU_ACTION_RIGHT:
|
||||
rarch_main_command(RARCH_CMD_DISK_NEXT);
|
||||
rarch_main_command(EVENT_CMD_DISK_NEXT);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ int menu_setting_generic(rarch_setting_t *setting)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
|
||||
if (setting->change_handler)
|
||||
|
@ -113,7 +113,7 @@ void recording_dump_frame(const void *data, unsigned width,
|
||||
if (!vp.width || !vp.height)
|
||||
{
|
||||
RARCH_WARN("Viewport size calculation failed! Will continue using raw data. This will probably not work right ...\n");
|
||||
rarch_main_command(RARCH_CMD_GPU_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_GPU_RECORD_DEINIT);
|
||||
|
||||
recording_dump_frame(data, width, height, pitch);
|
||||
return;
|
||||
@ -127,7 +127,7 @@ void recording_dump_frame(const void *data, unsigned width,
|
||||
RARCH_WARN("%s\n", msg);
|
||||
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
rarch_main_command(RARCH_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_RECORD_DEINIT);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ bool recording_deinit(void)
|
||||
driver->recording_data = NULL;
|
||||
driver->recording = NULL;
|
||||
|
||||
rarch_main_command(RARCH_CMD_GPU_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_GPU_RECORD_DEINIT);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -302,7 +302,7 @@ bool recording_init(void)
|
||||
if (!ffemu_init_first(&driver->recording, &driver->recording_data, ¶ms))
|
||||
{
|
||||
RARCH_ERR(RETRO_LOG_INIT_RECORDING_FAILED);
|
||||
rarch_main_command(RARCH_CMD_GPU_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_GPU_RECORD_DEINIT);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
356
retroarch.c
356
retroarch.c
@ -1091,7 +1091,7 @@ static void rarch_init_savefile_paths(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
rarch_main_command(RARCH_CMD_SAVEFILES_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SAVEFILES_DEINIT);
|
||||
|
||||
global->savefiles = string_list_new();
|
||||
rarch_assert(global->savefiles);
|
||||
@ -1321,9 +1321,9 @@ static void main_state(unsigned cmd)
|
||||
|
||||
if (pretro_serialize_size())
|
||||
{
|
||||
if (cmd == RARCH_CMD_SAVE_STATE)
|
||||
if (cmd == EVENT_CMD_SAVE_STATE)
|
||||
rarch_save_state(path, msg, sizeof(msg));
|
||||
else if (cmd == RARCH_CMD_LOAD_STATE)
|
||||
else if (cmd == EVENT_CMD_LOAD_STATE)
|
||||
rarch_load_state(path, msg, sizeof(msg));
|
||||
}
|
||||
else
|
||||
@ -1363,7 +1363,7 @@ void rarch_disk_control_append_image(const char *path)
|
||||
RARCH_LOG("%s\n", msg);
|
||||
rarch_main_msg_queue_push(msg, 0, 180, true);
|
||||
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_DEINIT);
|
||||
|
||||
/* TODO: Need to figure out what to do with subsystems case. */
|
||||
if (!*global->subsystem)
|
||||
@ -1376,7 +1376,7 @@ void rarch_disk_control_append_image(const char *path)
|
||||
fill_pathnames();
|
||||
}
|
||||
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_INIT);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_INIT);
|
||||
|
||||
rarch_disk_control_set_eject(false, false);
|
||||
}
|
||||
@ -1580,8 +1580,8 @@ static void main_clear_state_drivers(void)
|
||||
if (!inited)
|
||||
return;
|
||||
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_INIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_INIT);
|
||||
}
|
||||
|
||||
static void main_init_state_config(void)
|
||||
@ -1607,7 +1607,7 @@ void rarch_main_alloc(void)
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
rarch_main_command(RARCH_CMD_HISTORY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_HISTORY_DEINIT);
|
||||
|
||||
rarch_main_clear_state();
|
||||
rarch_main_data_clear_state();
|
||||
@ -1627,14 +1627,14 @@ void rarch_main_new(void)
|
||||
init_state();
|
||||
main_init_state_config();
|
||||
|
||||
rarch_main_command(RARCH_CMD_MSG_QUEUE_INIT);
|
||||
rarch_main_command(EVENT_CMD_MSG_QUEUE_INIT);
|
||||
}
|
||||
|
||||
void rarch_main_free(void)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_MSG_QUEUE_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_LOG_FILE_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_MSG_QUEUE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_LOG_FILE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
|
||||
rarch_main_state_free();
|
||||
rarch_main_global_free();
|
||||
@ -1749,7 +1749,7 @@ static void deinit_core(bool reinit)
|
||||
pretro_deinit();
|
||||
|
||||
if (reinit)
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
|
||||
if(global->overrides_active)
|
||||
{
|
||||
@ -1784,8 +1784,8 @@ static bool init_content(void)
|
||||
RARCH_LOG("Skipping SRAM load.\n");
|
||||
|
||||
load_auto_state();
|
||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_INIT);
|
||||
rarch_main_command(RARCH_CMD_NETPLAY_INIT);
|
||||
rarch_main_command(EVENT_CMD_BSV_MOVIE_INIT);
|
||||
rarch_main_command(EVENT_CMD_NETPLAY_INIT);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1862,25 +1862,25 @@ int rarch_main_init(int argc, char *argv[])
|
||||
|
||||
init_drivers_pre();
|
||||
|
||||
if (!rarch_main_command(RARCH_CMD_CORE_INIT))
|
||||
if (!rarch_main_command(EVENT_CMD_CORE_INIT))
|
||||
goto error;
|
||||
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_INIT);
|
||||
rarch_main_command(RARCH_CMD_COMMAND_INIT);
|
||||
rarch_main_command(RARCH_CMD_REWIND_INIT);
|
||||
rarch_main_command(RARCH_CMD_CONTROLLERS_INIT);
|
||||
rarch_main_command(RARCH_CMD_RECORD_INIT);
|
||||
rarch_main_command(RARCH_CMD_CHEATS_INIT);
|
||||
rarch_main_command(RARCH_CMD_REMAPPING_INIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_INIT);
|
||||
rarch_main_command(EVENT_CMD_COMMAND_INIT);
|
||||
rarch_main_command(EVENT_CMD_REWIND_INIT);
|
||||
rarch_main_command(EVENT_CMD_CONTROLLERS_INIT);
|
||||
rarch_main_command(EVENT_CMD_RECORD_INIT);
|
||||
rarch_main_command(EVENT_CMD_CHEATS_INIT);
|
||||
rarch_main_command(EVENT_CMD_REMAPPING_INIT);
|
||||
|
||||
rarch_main_command(RARCH_CMD_SAVEFILES_INIT);
|
||||
rarch_main_command(EVENT_CMD_SAVEFILES_INIT);
|
||||
#if defined(GEKKO) && defined(HW_RVL)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
video_driver_set_aspect_ratio(settings->video.aspect_ratio_idx);
|
||||
}
|
||||
}
|
||||
@ -1891,7 +1891,7 @@ int rarch_main_init(int argc, char *argv[])
|
||||
return 0;
|
||||
|
||||
error:
|
||||
rarch_main_command(RARCH_CMD_CORE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_CORE_DEINIT);
|
||||
|
||||
global->main_is_init = false;
|
||||
return 1;
|
||||
@ -1980,12 +1980,12 @@ void rarch_main_set_state(unsigned cmd)
|
||||
menu_driver_toggle(true);
|
||||
|
||||
/* Menu should always run with vsync on. */
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
/* Stop all rumbling before entering the menu. */
|
||||
rarch_main_command(RARCH_CMD_RUMBLE_STOP);
|
||||
rarch_main_command(EVENT_CMD_RUMBLE_STOP);
|
||||
|
||||
if (settings->menu.pause_libretro)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_STOP);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_STOP);
|
||||
|
||||
/* Override keyboard callback to redirect to menu instead.
|
||||
* We'll use this later for something ...
|
||||
@ -2022,7 +2022,7 @@ void rarch_main_set_state(unsigned cmd)
|
||||
driver_set_nonblock_state(driver->nonblock_state);
|
||||
|
||||
if (settings && settings->menu.pause_libretro)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_START);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_START);
|
||||
|
||||
/* Prevent stray input from going to libretro core */
|
||||
driver->flushing_input = true;
|
||||
@ -2212,30 +2212,30 @@ bool rarch_main_command(unsigned cmd)
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case RARCH_CMD_LOAD_CONTENT_PERSIST:
|
||||
case EVENT_CMD_LOAD_CONTENT_PERSIST:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
#endif
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_LOAD_CONTENT);
|
||||
break;
|
||||
case RARCH_CMD_LOAD_CONTENT:
|
||||
case EVENT_CMD_LOAD_CONTENT:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT_PERSIST);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CONTENT_PERSIST);
|
||||
#else
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH,
|
||||
(void*)settings->libretro);
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC,
|
||||
(void*)global->fullpath);
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_LOAD_CORE_DEINIT:
|
||||
case EVENT_CMD_LOAD_CORE_DEINIT:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
libretro_free_system_info(&global->menu.info);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_LOAD_CORE_PERSIST:
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE_DEINIT);
|
||||
case EVENT_CMD_LOAD_CORE_PERSIST:
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE_DEINIT);
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
@ -2245,13 +2245,13 @@ bool rarch_main_command(unsigned cmd)
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_LOAD_CORE:
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE_PERSIST);
|
||||
case EVENT_CMD_LOAD_CORE:
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE_PERSIST);
|
||||
#ifndef HAVE_DYNAMIC
|
||||
rarch_main_command(RARCH_CMD_QUIT);
|
||||
rarch_main_command(EVENT_CMD_QUIT);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_LOAD_STATE:
|
||||
case EVENT_CMD_LOAD_STATE:
|
||||
/* Immutable - disallow savestate load when
|
||||
* we absolutely cannot change game state. */
|
||||
if (global->bsv.movie)
|
||||
@ -2263,46 +2263,46 @@ bool rarch_main_command(unsigned cmd)
|
||||
#endif
|
||||
main_state(cmd);
|
||||
break;
|
||||
case RARCH_CMD_RESIZE_WINDOWED_SCALE:
|
||||
case EVENT_CMD_RESIZE_WINDOWED_SCALE:
|
||||
if (global->pending.windowed_scale == 0)
|
||||
return false;
|
||||
|
||||
settings->video.scale = global->pending.windowed_scale;
|
||||
|
||||
if (!settings->video.fullscreen)
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
|
||||
global->pending.windowed_scale = 0;
|
||||
break;
|
||||
case RARCH_CMD_MENU_TOGGLE:
|
||||
case EVENT_CMD_MENU_TOGGLE:
|
||||
if (runloop->is_menu)
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
else
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING);
|
||||
break;
|
||||
case RARCH_CMD_CONTROLLERS_INIT:
|
||||
case EVENT_CMD_CONTROLLERS_INIT:
|
||||
init_controllers();
|
||||
break;
|
||||
case RARCH_CMD_RESET:
|
||||
case EVENT_CMD_RESET:
|
||||
RARCH_LOG(RETRO_LOG_RESETTING_CONTENT);
|
||||
rarch_main_msg_queue_push("Reset.", 1, 120, true);
|
||||
pretro_reset();
|
||||
|
||||
/* bSNES since v073r01 resets controllers to JOYPAD
|
||||
* after a reset, so just enforce it here. */
|
||||
rarch_main_command(RARCH_CMD_CONTROLLERS_INIT);
|
||||
rarch_main_command(EVENT_CMD_CONTROLLERS_INIT);
|
||||
break;
|
||||
case RARCH_CMD_SAVE_STATE:
|
||||
case EVENT_CMD_SAVE_STATE:
|
||||
if (settings->savestate_auto_index)
|
||||
settings->state_slot++;
|
||||
|
||||
main_state(cmd);
|
||||
break;
|
||||
case RARCH_CMD_TAKE_SCREENSHOT:
|
||||
case EVENT_CMD_TAKE_SCREENSHOT:
|
||||
if (!take_screenshot())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_PREPARE_DUMMY:
|
||||
case EVENT_CMD_PREPARE_DUMMY:
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
@ -2317,20 +2317,20 @@ bool rarch_main_command(unsigned cmd)
|
||||
global->system.shutdown = false;
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_UNLOAD_CORE:
|
||||
rarch_main_command(RARCH_CMD_PREPARE_DUMMY);
|
||||
case EVENT_CMD_UNLOAD_CORE:
|
||||
rarch_main_command(EVENT_CMD_PREPARE_DUMMY);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
libretro_free_system_info(&global->menu.info);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_QUIT:
|
||||
case EVENT_CMD_QUIT:
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_QUIT);
|
||||
break;
|
||||
case RARCH_CMD_REINIT:
|
||||
case EVENT_CMD_REINIT:
|
||||
driver->video_cache_context =
|
||||
global->system.hw_render_callback.cache_context;
|
||||
driver->video_cache_context_ack = false;
|
||||
rarch_main_command(RARCH_CMD_RESET_CONTEXT);
|
||||
rarch_main_command(EVENT_CMD_RESET_CONTEXT);
|
||||
driver->video_cache_context = false;
|
||||
|
||||
/* Poll input to avoid possibly stale data to corrupt things. */
|
||||
@ -2339,10 +2339,10 @@ bool rarch_main_command(unsigned cmd)
|
||||
#ifdef HAVE_MENU
|
||||
runloop->frames.video.current.menu.framebuf.dirty = true;
|
||||
if (runloop->is_menu)
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_CHEATS_DEINIT:
|
||||
case EVENT_CMD_CHEATS_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2350,17 +2350,17 @@ bool rarch_main_command(unsigned cmd)
|
||||
cheat_manager_free(global->cheat);
|
||||
global->cheat = NULL;
|
||||
break;
|
||||
case RARCH_CMD_CHEATS_INIT:
|
||||
rarch_main_command(RARCH_CMD_CHEATS_DEINIT);
|
||||
case EVENT_CMD_CHEATS_INIT:
|
||||
rarch_main_command(EVENT_CMD_CHEATS_DEINIT);
|
||||
init_cheats();
|
||||
break;
|
||||
case RARCH_CMD_REMAPPING_DEINIT:
|
||||
case EVENT_CMD_REMAPPING_DEINIT:
|
||||
break;
|
||||
case RARCH_CMD_REMAPPING_INIT:
|
||||
rarch_main_command(RARCH_CMD_REMAPPING_DEINIT);
|
||||
case EVENT_CMD_REMAPPING_INIT:
|
||||
rarch_main_command(EVENT_CMD_REMAPPING_DEINIT);
|
||||
init_remapping();
|
||||
break;
|
||||
case RARCH_CMD_REWIND_DEINIT:
|
||||
case EVENT_CMD_REWIND_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
#ifdef HAVE_NETPLAY
|
||||
@ -2371,30 +2371,30 @@ bool rarch_main_command(unsigned cmd)
|
||||
state_manager_free(global->rewind.state);
|
||||
global->rewind.state = NULL;
|
||||
break;
|
||||
case RARCH_CMD_REWIND_INIT:
|
||||
case EVENT_CMD_REWIND_INIT:
|
||||
init_rewind();
|
||||
break;
|
||||
case RARCH_CMD_REWIND_TOGGLE:
|
||||
case EVENT_CMD_REWIND_TOGGLE:
|
||||
if (settings->rewind_enable)
|
||||
rarch_main_command(RARCH_CMD_REWIND_INIT);
|
||||
rarch_main_command(EVENT_CMD_REWIND_INIT);
|
||||
else
|
||||
rarch_main_command(RARCH_CMD_REWIND_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_REWIND_DEINIT);
|
||||
break;
|
||||
case RARCH_CMD_AUTOSAVE_DEINIT:
|
||||
case EVENT_CMD_AUTOSAVE_DEINIT:
|
||||
#ifdef HAVE_THREADS
|
||||
deinit_autosave();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_AUTOSAVE_INIT:
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_DEINIT);
|
||||
case EVENT_CMD_AUTOSAVE_INIT:
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_DEINIT);
|
||||
#ifdef HAVE_THREADS
|
||||
init_autosave();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_AUTOSAVE_STATE:
|
||||
case EVENT_CMD_AUTOSAVE_STATE:
|
||||
save_auto_state();
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_STOP:
|
||||
case EVENT_CMD_AUDIO_STOP:
|
||||
if (!driver->audio_data)
|
||||
return false;
|
||||
if (!audio_driver_alive())
|
||||
@ -2403,7 +2403,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
if (!audio_driver_stop())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_START:
|
||||
case EVENT_CMD_AUDIO_START:
|
||||
if (!driver->audio_data || audio_driver_alive())
|
||||
return false;
|
||||
|
||||
@ -2413,7 +2413,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
driver->audio_active = false;
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_MUTE_TOGGLE:
|
||||
case EVENT_CMD_AUDIO_MUTE_TOGGLE:
|
||||
{
|
||||
const char *msg = !settings->audio.mute_enable ?
|
||||
"Audio muted." : "Audio unmuted.";
|
||||
@ -2428,7 +2428,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_OVERLAY_DEINIT:
|
||||
case EVENT_CMD_OVERLAY_DEINIT:
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (driver->overlay)
|
||||
input_overlay_free(driver->overlay);
|
||||
@ -2437,8 +2437,8 @@ bool rarch_main_command(unsigned cmd)
|
||||
memset(&driver->overlay_state, 0, sizeof(driver->overlay_state));
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_OVERLAY_INIT:
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
||||
case EVENT_CMD_OVERLAY_INIT:
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_DEINIT);
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (driver->osk_enable)
|
||||
{
|
||||
@ -2458,12 +2458,12 @@ bool rarch_main_command(unsigned cmd)
|
||||
RARCH_ERR("Failed to load overlay.\n");
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_OVERLAY_NEXT:
|
||||
case EVENT_CMD_OVERLAY_NEXT:
|
||||
#ifdef HAVE_OVERLAY
|
||||
input_overlay_next(driver->overlay, settings->input.overlay_opacity);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_DSP_FILTER_DEINIT:
|
||||
case EVENT_CMD_DSP_FILTER_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2471,8 +2471,8 @@ bool rarch_main_command(unsigned cmd)
|
||||
rarch_dsp_filter_free(global->audio_data.dsp);
|
||||
global->audio_data.dsp = NULL;
|
||||
break;
|
||||
case RARCH_CMD_DSP_FILTER_INIT:
|
||||
rarch_main_command(RARCH_CMD_DSP_FILTER_DEINIT);
|
||||
case EVENT_CMD_DSP_FILTER_INIT:
|
||||
rarch_main_command(EVENT_CMD_DSP_FILTER_DEINIT);
|
||||
if (!*settings->audio.dsp_plugin)
|
||||
break;
|
||||
|
||||
@ -2482,7 +2482,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
RARCH_ERR("[DSP]: Failed to initialize DSP filter \"%s\".\n",
|
||||
settings->audio.dsp_plugin);
|
||||
break;
|
||||
case RARCH_CMD_GPU_RECORD_DEINIT:
|
||||
case EVENT_CMD_GPU_RECORD_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2490,22 +2490,22 @@ bool rarch_main_command(unsigned cmd)
|
||||
free(global->record.gpu_buffer);
|
||||
global->record.gpu_buffer = NULL;
|
||||
break;
|
||||
case RARCH_CMD_RECORD_DEINIT:
|
||||
case EVENT_CMD_RECORD_DEINIT:
|
||||
if (!recording_deinit())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_RECORD_INIT:
|
||||
rarch_main_command(RARCH_CMD_HISTORY_DEINIT);
|
||||
case EVENT_CMD_RECORD_INIT:
|
||||
rarch_main_command(EVENT_CMD_HISTORY_DEINIT);
|
||||
if (!recording_init())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_HISTORY_DEINIT:
|
||||
case EVENT_CMD_HISTORY_DEINIT:
|
||||
if (g_defaults.history)
|
||||
content_playlist_free(g_defaults.history);
|
||||
g_defaults.history = NULL;
|
||||
break;
|
||||
case RARCH_CMD_HISTORY_INIT:
|
||||
rarch_main_command(RARCH_CMD_HISTORY_DEINIT);
|
||||
case EVENT_CMD_HISTORY_INIT:
|
||||
rarch_main_command(EVENT_CMD_HISTORY_DEINIT);
|
||||
if (!settings->history_list_enable)
|
||||
return false;
|
||||
RARCH_LOG("Loading history file: [%s].\n", settings->content_history_path);
|
||||
@ -2513,7 +2513,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
settings->content_history_path,
|
||||
settings->content_history_size);
|
||||
break;
|
||||
case RARCH_CMD_CORE_INFO_DEINIT:
|
||||
case EVENT_CMD_CORE_INFO_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2521,71 +2521,71 @@ bool rarch_main_command(unsigned cmd)
|
||||
core_info_list_free(global->core_info);
|
||||
global->core_info = NULL;
|
||||
break;
|
||||
case RARCH_CMD_DATA_RUNLOOP_FREE:
|
||||
case EVENT_CMD_DATA_RUNLOOP_FREE:
|
||||
rarch_main_data_free();
|
||||
break;
|
||||
case RARCH_CMD_CORE_INFO_INIT:
|
||||
rarch_main_command(RARCH_CMD_CORE_INFO_DEINIT);
|
||||
case EVENT_CMD_CORE_INFO_INIT:
|
||||
rarch_main_command(EVENT_CMD_CORE_INFO_DEINIT);
|
||||
|
||||
if (*settings->libretro_directory)
|
||||
global->core_info = core_info_list_new(settings->libretro_directory);
|
||||
break;
|
||||
case RARCH_CMD_CORE_DEINIT:
|
||||
case EVENT_CMD_CORE_DEINIT:
|
||||
deinit_core(true);
|
||||
break;
|
||||
case RARCH_CMD_CORE_INIT:
|
||||
case EVENT_CMD_CORE_INIT:
|
||||
if (!init_core())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_VIDEO_APPLY_STATE_CHANGES:
|
||||
case EVENT_CMD_VIDEO_APPLY_STATE_CHANGES:
|
||||
video_driver_apply_state_changes();
|
||||
break;
|
||||
case RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE:
|
||||
case EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE:
|
||||
boolean = true; /* fall-through */
|
||||
case RARCH_CMD_VIDEO_SET_BLOCKING_STATE:
|
||||
case EVENT_CMD_VIDEO_SET_BLOCKING_STATE:
|
||||
video_driver_set_nonblock_state(boolean);
|
||||
break;
|
||||
case RARCH_CMD_VIDEO_SET_ASPECT_RATIO:
|
||||
case EVENT_CMD_VIDEO_SET_ASPECT_RATIO:
|
||||
video_driver_set_aspect_ratio(settings->video.aspect_ratio_idx);
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE:
|
||||
case EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE:
|
||||
boolean = true; /* fall-through */
|
||||
case RARCH_CMD_AUDIO_SET_BLOCKING_STATE:
|
||||
case EVENT_CMD_AUDIO_SET_BLOCKING_STATE:
|
||||
audio_driver_set_nonblock_state(boolean);
|
||||
break;
|
||||
case RARCH_CMD_OVERLAY_SET_SCALE_FACTOR:
|
||||
case EVENT_CMD_OVERLAY_SET_SCALE_FACTOR:
|
||||
#ifdef HAVE_OVERLAY
|
||||
input_overlay_set_scale_factor(driver->overlay,
|
||||
settings->input.overlay_scale);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_OVERLAY_SET_ALPHA_MOD:
|
||||
case EVENT_CMD_OVERLAY_SET_ALPHA_MOD:
|
||||
#ifdef HAVE_OVERLAY
|
||||
input_overlay_set_alpha_mod(driver->overlay,
|
||||
settings->input.overlay_opacity);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_DRIVERS_DEINIT:
|
||||
case EVENT_CMD_DRIVERS_DEINIT:
|
||||
uninit_drivers(DRIVERS_CMD_ALL);
|
||||
break;
|
||||
case RARCH_CMD_DRIVERS_INIT:
|
||||
case EVENT_CMD_DRIVERS_INIT:
|
||||
init_drivers(DRIVERS_CMD_ALL);
|
||||
break;
|
||||
case RARCH_CMD_AUDIO_REINIT:
|
||||
case EVENT_CMD_AUDIO_REINIT:
|
||||
uninit_drivers(DRIVER_AUDIO);
|
||||
init_drivers(DRIVER_AUDIO);
|
||||
break;
|
||||
case RARCH_CMD_RESET_CONTEXT:
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_DRIVERS_INIT);
|
||||
case EVENT_CMD_RESET_CONTEXT:
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_DRIVERS_INIT);
|
||||
break;
|
||||
case RARCH_CMD_QUIT_RETROARCH:
|
||||
case EVENT_CMD_QUIT_RETROARCH:
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_FORCE_QUIT);
|
||||
break;
|
||||
case RARCH_CMD_RESUME:
|
||||
case EVENT_CMD_RESUME:
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
break;
|
||||
case RARCH_CMD_RESTART_RETROARCH:
|
||||
case EVENT_CMD_RESTART_RETROARCH:
|
||||
#if defined(GEKKO) && defined(HW_RVL)
|
||||
fill_pathname_join(global->fullpath, g_defaults.core_dir,
|
||||
SALAMANDER_FILE,
|
||||
@ -2594,20 +2594,20 @@ bool rarch_main_command(unsigned cmd)
|
||||
if (driver->frontend_ctx && driver->frontend_ctx->set_fork)
|
||||
driver->frontend_ctx->set_fork(true, false);
|
||||
break;
|
||||
case RARCH_CMD_MENU_SAVE_CONFIG:
|
||||
case EVENT_CMD_MENU_SAVE_CONFIG:
|
||||
if (!save_core_config())
|
||||
return false;
|
||||
break;
|
||||
case RARCH_CMD_SHADERS_APPLY_CHANGES:
|
||||
case EVENT_CMD_SHADERS_APPLY_CHANGES:
|
||||
#ifdef HAVE_MENU
|
||||
menu_shader_manager_apply_changes();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_PAUSE_CHECKS:
|
||||
case EVENT_CMD_PAUSE_CHECKS:
|
||||
if (runloop->is_paused)
|
||||
{
|
||||
RARCH_LOG("Paused.\n");
|
||||
rarch_main_command(RARCH_CMD_AUDIO_STOP);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_STOP);
|
||||
|
||||
if (settings->video.black_frame_insertion)
|
||||
rarch_render_cached_frame();
|
||||
@ -2615,36 +2615,36 @@ bool rarch_main_command(unsigned cmd)
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Unpaused.\n");
|
||||
rarch_main_command(RARCH_CMD_AUDIO_START);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_START);
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_PAUSE_TOGGLE:
|
||||
case EVENT_CMD_PAUSE_TOGGLE:
|
||||
runloop->is_paused = !runloop->is_paused;
|
||||
rarch_main_command(RARCH_CMD_PAUSE_CHECKS);
|
||||
rarch_main_command(EVENT_CMD_PAUSE_CHECKS);
|
||||
break;
|
||||
case RARCH_CMD_UNPAUSE:
|
||||
case EVENT_CMD_UNPAUSE:
|
||||
runloop->is_paused = false;
|
||||
rarch_main_command(RARCH_CMD_PAUSE_CHECKS);
|
||||
rarch_main_command(EVENT_CMD_PAUSE_CHECKS);
|
||||
break;
|
||||
case RARCH_CMD_PAUSE:
|
||||
case EVENT_CMD_PAUSE:
|
||||
runloop->is_paused = true;
|
||||
rarch_main_command(RARCH_CMD_PAUSE_CHECKS);
|
||||
rarch_main_command(EVENT_CMD_PAUSE_CHECKS);
|
||||
break;
|
||||
case RARCH_CMD_MENU_PAUSE_LIBRETRO:
|
||||
case EVENT_CMD_MENU_PAUSE_LIBRETRO:
|
||||
if (runloop->is_menu)
|
||||
{
|
||||
if (settings->menu.pause_libretro)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_STOP);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_STOP);
|
||||
else
|
||||
rarch_main_command(RARCH_CMD_AUDIO_START);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_START);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->menu.pause_libretro)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_START);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_START);
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_SHADER_DIR_DEINIT:
|
||||
case EVENT_CMD_SHADER_DIR_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2652,8 +2652,8 @@ bool rarch_main_command(unsigned cmd)
|
||||
global->shader_dir.list = NULL;
|
||||
global->shader_dir.ptr = 0;
|
||||
break;
|
||||
case RARCH_CMD_SHADER_DIR_INIT:
|
||||
rarch_main_command(RARCH_CMD_SHADER_DIR_DEINIT);
|
||||
case EVENT_CMD_SHADER_DIR_INIT:
|
||||
rarch_main_command(EVENT_CMD_SHADER_DIR_DEINIT);
|
||||
|
||||
if (!*settings->video.shader_dir)
|
||||
return false;
|
||||
@ -2663,7 +2663,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
|
||||
if (!global->shader_dir.list || global->shader_dir.list->size == 0)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_SHADER_DIR_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SHADER_DIR_DEINIT);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2674,10 +2674,10 @@ bool rarch_main_command(unsigned cmd)
|
||||
RARCH_LOG("Found shader \"%s\"\n",
|
||||
global->shader_dir.list->elems[i].data);
|
||||
break;
|
||||
case RARCH_CMD_SAVEFILES:
|
||||
case EVENT_CMD_SAVEFILES:
|
||||
save_files();
|
||||
break;
|
||||
case RARCH_CMD_SAVEFILES_DEINIT:
|
||||
case EVENT_CMD_SAVEFILES_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2685,7 +2685,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
string_list_free(global->savefiles);
|
||||
global->savefiles = NULL;
|
||||
break;
|
||||
case RARCH_CMD_SAVEFILES_INIT:
|
||||
case EVENT_CMD_SAVEFILES_INIT:
|
||||
global->use_sram = global->use_sram && !global->sram_save_disable
|
||||
#ifdef HAVE_NETPLAY
|
||||
&& (!driver->netplay_data || !global->netplay_is_client)
|
||||
@ -2696,17 +2696,17 @@ bool rarch_main_command(unsigned cmd)
|
||||
RARCH_LOG("SRAM will not be saved.\n");
|
||||
|
||||
if (global->use_sram)
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_INIT);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_INIT);
|
||||
break;
|
||||
case RARCH_CMD_MSG_QUEUE_DEINIT:
|
||||
case EVENT_CMD_MSG_QUEUE_DEINIT:
|
||||
rarch_main_msg_queue_free();
|
||||
break;
|
||||
case RARCH_CMD_MSG_QUEUE_INIT:
|
||||
rarch_main_command(RARCH_CMD_MSG_QUEUE_DEINIT);
|
||||
case EVENT_CMD_MSG_QUEUE_INIT:
|
||||
rarch_main_command(EVENT_CMD_MSG_QUEUE_DEINIT);
|
||||
rarch_main_msg_queue_init();
|
||||
rarch_main_data_init_queues();
|
||||
break;
|
||||
case RARCH_CMD_BSV_MOVIE_DEINIT:
|
||||
case EVENT_CMD_BSV_MOVIE_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2714,33 +2714,33 @@ bool rarch_main_command(unsigned cmd)
|
||||
bsv_movie_free(global->bsv.movie);
|
||||
global->bsv.movie = NULL;
|
||||
break;
|
||||
case RARCH_CMD_BSV_MOVIE_INIT:
|
||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_DEINIT);
|
||||
case EVENT_CMD_BSV_MOVIE_INIT:
|
||||
rarch_main_command(EVENT_CMD_BSV_MOVIE_DEINIT);
|
||||
init_movie();
|
||||
break;
|
||||
case RARCH_CMD_NETPLAY_DEINIT:
|
||||
case EVENT_CMD_NETPLAY_DEINIT:
|
||||
#ifdef HAVE_NETPLAY
|
||||
deinit_netplay();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETWORK_DEINIT:
|
||||
case EVENT_CMD_NETWORK_DEINIT:
|
||||
#ifdef HAVE_NETWORKING
|
||||
network_deinit();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETWORK_INIT:
|
||||
case EVENT_CMD_NETWORK_INIT:
|
||||
#ifdef HAVE_NETWORKING
|
||||
network_init();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETPLAY_INIT:
|
||||
rarch_main_command(RARCH_CMD_NETPLAY_DEINIT);
|
||||
case EVENT_CMD_NETPLAY_INIT:
|
||||
rarch_main_command(EVENT_CMD_NETPLAY_DEINIT);
|
||||
#ifdef HAVE_NETPLAY
|
||||
if (!init_netplay())
|
||||
return false;
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETPLAY_FLIP_PLAYERS:
|
||||
case EVENT_CMD_NETPLAY_FLIP_PLAYERS:
|
||||
#ifdef HAVE_NETPLAY
|
||||
{
|
||||
netplay_t *netplay = (netplay_t*)driver->netplay_data;
|
||||
@ -2750,30 +2750,30 @@ bool rarch_main_command(unsigned cmd)
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_FULLSCREEN_TOGGLE:
|
||||
case EVENT_CMD_FULLSCREEN_TOGGLE:
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
|
||||
/* If we go fullscreen we drop all drivers and
|
||||
* reinitialize to be safe. */
|
||||
settings->video.fullscreen = !settings->video.fullscreen;
|
||||
rarch_main_command(RARCH_CMD_REINIT);
|
||||
rarch_main_command(EVENT_CMD_REINIT);
|
||||
break;
|
||||
case RARCH_CMD_COMMAND_DEINIT:
|
||||
case EVENT_CMD_COMMAND_DEINIT:
|
||||
#ifdef HAVE_COMMAND
|
||||
if (driver->command)
|
||||
rarch_cmd_free(driver->command);
|
||||
driver->command = NULL;
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_COMMAND_INIT:
|
||||
rarch_main_command(RARCH_CMD_COMMAND_DEINIT);
|
||||
case EVENT_CMD_COMMAND_INIT:
|
||||
rarch_main_command(EVENT_CMD_COMMAND_DEINIT);
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
init_command();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_TEMPORARY_CONTENT_DEINIT:
|
||||
case EVENT_CMD_TEMPORARY_CONTENT_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2781,7 +2781,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
free_temporary_content();
|
||||
global->temporary_content = NULL;
|
||||
break;
|
||||
case RARCH_CMD_SUBSYSTEM_FULLPATHS_DEINIT:
|
||||
case EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2789,7 +2789,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
string_list_free(global->subsystem_fullpaths);
|
||||
global->subsystem_fullpaths = NULL;
|
||||
break;
|
||||
case RARCH_CMD_LOG_FILE_DEINIT:
|
||||
case EVENT_CMD_LOG_FILE_DEINIT:
|
||||
if (!global)
|
||||
break;
|
||||
|
||||
@ -2797,7 +2797,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
fclose(global->log_file);
|
||||
global->log_file = NULL;
|
||||
break;
|
||||
case RARCH_CMD_DISK_EJECT_TOGGLE:
|
||||
case EVENT_CMD_DISK_EJECT_TOGGLE:
|
||||
if (global->system.disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
@ -2810,7 +2810,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
else
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_DISK_NEXT:
|
||||
case EVENT_CMD_DISK_NEXT:
|
||||
if (global->system.disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
@ -2828,7 +2828,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
else
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_DISK_PREV:
|
||||
case EVENT_CMD_DISK_PREV:
|
||||
if (global->system.disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
@ -2846,14 +2846,14 @@ bool rarch_main_command(unsigned cmd)
|
||||
else
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_RUMBLE_STOP:
|
||||
case EVENT_CMD_RUMBLE_STOP:
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
input_driver_set_rumble_state(i, RETRO_RUMBLE_STRONG, 0);
|
||||
input_driver_set_rumble_state(i, RETRO_RUMBLE_WEAK, 0);
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_GRAB_MOUSE_TOGGLE:
|
||||
case EVENT_CMD_GRAB_MOUSE_TOGGLE:
|
||||
{
|
||||
static bool grab_mouse_state = false;
|
||||
|
||||
@ -2868,13 +2868,13 @@ bool rarch_main_command(unsigned cmd)
|
||||
video_driver_show_mouse(!grab_mouse_state);
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_PERFCNT_REPORT_FRONTEND_LOG:
|
||||
case EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG:
|
||||
rarch_perf_log();
|
||||
break;
|
||||
case RARCH_CMD_VOLUME_UP:
|
||||
case EVENT_CMD_VOLUME_UP:
|
||||
set_volume(0.5f);
|
||||
break;
|
||||
case RARCH_CMD_VOLUME_DOWN:
|
||||
case EVENT_CMD_VOLUME_DOWN:
|
||||
set_volume(-0.5f);
|
||||
break;
|
||||
}
|
||||
@ -2891,26 +2891,26 @@ void rarch_main_deinit(void)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
rarch_main_command(RARCH_CMD_NETPLAY_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_COMMAND_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_NETPLAY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_COMMAND_DEINIT);
|
||||
|
||||
if (global->use_sram)
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_DEINIT);
|
||||
|
||||
rarch_main_command(RARCH_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_SAVEFILES);
|
||||
rarch_main_command(EVENT_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SAVEFILES);
|
||||
|
||||
rarch_main_command(RARCH_CMD_REWIND_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_CHEATS_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_REWIND_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_CHEATS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_BSV_MOVIE_DEINIT);
|
||||
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_STATE);
|
||||
rarch_main_command(EVENT_CMD_AUTOSAVE_STATE);
|
||||
|
||||
rarch_main_command(RARCH_CMD_CORE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_CORE_DEINIT);
|
||||
|
||||
rarch_main_command(RARCH_CMD_TEMPORARY_CONTENT_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_SUBSYSTEM_FULLPATHS_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_SAVEFILES_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_TEMPORARY_CONTENT_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SAVEFILES_DEINIT);
|
||||
|
||||
global->main_is_init = false;
|
||||
}
|
||||
@ -2940,7 +2940,7 @@ void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)path);
|
||||
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3048,7 +3048,7 @@ bool rarch_replace_config(const char *path)
|
||||
global->block_config_read = false;
|
||||
*settings->libretro = '\0'; /* Load core in new config. */
|
||||
|
||||
rarch_main_command(RARCH_CMD_PREPARE_DUMMY);
|
||||
rarch_main_command(EVENT_CMD_PREPARE_DUMMY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
192
retroarch.h
192
retroarch.h
@ -24,177 +24,177 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum basic_event
|
||||
enum event_command
|
||||
{
|
||||
RARCH_CMD_NONE = 0,
|
||||
EVENT_CMD_NONE = 0,
|
||||
/* Resets RetroArch. */
|
||||
RARCH_CMD_RESET,
|
||||
EVENT_CMD_RESET,
|
||||
/* Loads content file. */
|
||||
RARCH_CMD_LOAD_CONTENT,
|
||||
RARCH_CMD_LOAD_CONTENT_PERSIST,
|
||||
EVENT_CMD_LOAD_CONTENT,
|
||||
EVENT_CMD_LOAD_CONTENT_PERSIST,
|
||||
/* Loads core. */
|
||||
RARCH_CMD_LOAD_CORE_DEINIT,
|
||||
RARCH_CMD_LOAD_CORE,
|
||||
RARCH_CMD_LOAD_CORE_PERSIST,
|
||||
RARCH_CMD_UNLOAD_CORE,
|
||||
RARCH_CMD_LOAD_STATE,
|
||||
RARCH_CMD_SAVE_STATE,
|
||||
EVENT_CMD_LOAD_CORE_DEINIT,
|
||||
EVENT_CMD_LOAD_CORE,
|
||||
EVENT_CMD_LOAD_CORE_PERSIST,
|
||||
EVENT_CMD_UNLOAD_CORE,
|
||||
EVENT_CMD_LOAD_STATE,
|
||||
EVENT_CMD_SAVE_STATE,
|
||||
/* Takes screenshot. */
|
||||
RARCH_CMD_TAKE_SCREENSHOT,
|
||||
EVENT_CMD_TAKE_SCREENSHOT,
|
||||
/* Initializes dummy core. */
|
||||
RARCH_CMD_PREPARE_DUMMY,
|
||||
EVENT_CMD_PREPARE_DUMMY,
|
||||
/* Quits RetroArch. */
|
||||
RARCH_CMD_QUIT,
|
||||
EVENT_CMD_QUIT,
|
||||
/* Reinitialize all drivers. */
|
||||
RARCH_CMD_REINIT,
|
||||
EVENT_CMD_REINIT,
|
||||
/* Deinitialize rewind. */
|
||||
RARCH_CMD_REWIND_DEINIT,
|
||||
EVENT_CMD_REWIND_DEINIT,
|
||||
/* Initializes rewind. */
|
||||
RARCH_CMD_REWIND_INIT,
|
||||
EVENT_CMD_REWIND_INIT,
|
||||
/* Toggles rewind. */
|
||||
RARCH_CMD_REWIND_TOGGLE,
|
||||
EVENT_CMD_REWIND_TOGGLE,
|
||||
/* Deinitializes autosave. */
|
||||
RARCH_CMD_AUTOSAVE_DEINIT,
|
||||
EVENT_CMD_AUTOSAVE_DEINIT,
|
||||
/* Initializes autosave. */
|
||||
RARCH_CMD_AUTOSAVE_INIT,
|
||||
RARCH_CMD_AUTOSAVE_STATE,
|
||||
EVENT_CMD_AUTOSAVE_INIT,
|
||||
EVENT_CMD_AUTOSAVE_STATE,
|
||||
/* Stops audio. */
|
||||
RARCH_CMD_AUDIO_STOP,
|
||||
EVENT_CMD_AUDIO_STOP,
|
||||
/* Starts audio. */
|
||||
RARCH_CMD_AUDIO_START,
|
||||
EVENT_CMD_AUDIO_START,
|
||||
/* Mutes audio. */
|
||||
RARCH_CMD_AUDIO_MUTE_TOGGLE,
|
||||
EVENT_CMD_AUDIO_MUTE_TOGGLE,
|
||||
/* Initializes overlay. */
|
||||
RARCH_CMD_OVERLAY_INIT,
|
||||
EVENT_CMD_OVERLAY_INIT,
|
||||
/* Deinitializes overlay. */
|
||||
RARCH_CMD_OVERLAY_DEINIT,
|
||||
EVENT_CMD_OVERLAY_DEINIT,
|
||||
/* Sets current scale factor for overlay. */
|
||||
RARCH_CMD_OVERLAY_SET_SCALE_FACTOR,
|
||||
EVENT_CMD_OVERLAY_SET_SCALE_FACTOR,
|
||||
/* Sets current alpha modulation for overlay. */
|
||||
RARCH_CMD_OVERLAY_SET_ALPHA_MOD,
|
||||
EVENT_CMD_OVERLAY_SET_ALPHA_MOD,
|
||||
/* Cycle to next overlay. */
|
||||
RARCH_CMD_OVERLAY_NEXT,
|
||||
EVENT_CMD_OVERLAY_NEXT,
|
||||
/* Deinitializes overlay. */
|
||||
RARCH_CMD_DSP_FILTER_INIT,
|
||||
EVENT_CMD_DSP_FILTER_INIT,
|
||||
/* Deinitializes graphics filter. */
|
||||
RARCH_CMD_DSP_FILTER_DEINIT,
|
||||
EVENT_CMD_DSP_FILTER_DEINIT,
|
||||
/* Deinitializes GPU recoring. */
|
||||
RARCH_CMD_GPU_RECORD_DEINIT,
|
||||
EVENT_CMD_GPU_RECORD_DEINIT,
|
||||
/* Initializes recording system. */
|
||||
RARCH_CMD_RECORD_INIT,
|
||||
EVENT_CMD_RECORD_INIT,
|
||||
/* Deinitializes recording system. */
|
||||
RARCH_CMD_RECORD_DEINIT,
|
||||
EVENT_CMD_RECORD_DEINIT,
|
||||
/* Deinitializes history playlist. */
|
||||
RARCH_CMD_HISTORY_DEINIT,
|
||||
EVENT_CMD_HISTORY_DEINIT,
|
||||
/* Initializes history playlist. */
|
||||
RARCH_CMD_HISTORY_INIT,
|
||||
EVENT_CMD_HISTORY_INIT,
|
||||
/* Deinitializes core information. */
|
||||
RARCH_CMD_CORE_INFO_DEINIT,
|
||||
EVENT_CMD_CORE_INFO_DEINIT,
|
||||
/* Initializes core information. */
|
||||
RARCH_CMD_CORE_INFO_INIT,
|
||||
EVENT_CMD_CORE_INFO_INIT,
|
||||
/* Deinitializes core. */
|
||||
RARCH_CMD_CORE_DEINIT,
|
||||
EVENT_CMD_CORE_DEINIT,
|
||||
/* Initializes core. */
|
||||
RARCH_CMD_CORE_INIT,
|
||||
EVENT_CMD_CORE_INIT,
|
||||
/* Set audio blocking state. */
|
||||
RARCH_CMD_AUDIO_SET_BLOCKING_STATE,
|
||||
EVENT_CMD_AUDIO_SET_BLOCKING_STATE,
|
||||
/* Set audio nonblocking state. */
|
||||
RARCH_CMD_AUDIO_SET_NONBLOCKING_STATE,
|
||||
EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE,
|
||||
/* Apply video state changes. */
|
||||
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES,
|
||||
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES,
|
||||
/* Set video blocking state. */
|
||||
RARCH_CMD_VIDEO_SET_BLOCKING_STATE,
|
||||
EVENT_CMD_VIDEO_SET_BLOCKING_STATE,
|
||||
/* Set video nonblocking state. */
|
||||
RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE,
|
||||
EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE,
|
||||
/* Sets current aspect ratio index. */
|
||||
RARCH_CMD_VIDEO_SET_ASPECT_RATIO,
|
||||
RARCH_CMD_RESET_CONTEXT,
|
||||
EVENT_CMD_VIDEO_SET_ASPECT_RATIO,
|
||||
EVENT_CMD_RESET_CONTEXT,
|
||||
/* Restarts RetroArch. */
|
||||
RARCH_CMD_RESTART_RETROARCH,
|
||||
EVENT_CMD_RESTART_RETROARCH,
|
||||
/* Force-quit RetroArch. */
|
||||
RARCH_CMD_QUIT_RETROARCH,
|
||||
EVENT_CMD_QUIT_RETROARCH,
|
||||
/* Resume RetroArch when in menu. */
|
||||
RARCH_CMD_RESUME,
|
||||
EVENT_CMD_RESUME,
|
||||
/* Toggles pause. */
|
||||
RARCH_CMD_PAUSE_TOGGLE,
|
||||
EVENT_CMD_PAUSE_TOGGLE,
|
||||
/* Pauses RetroArch. */
|
||||
RARCH_CMD_UNPAUSE,
|
||||
EVENT_CMD_UNPAUSE,
|
||||
/* Unpauses retroArch. */
|
||||
RARCH_CMD_PAUSE,
|
||||
RARCH_CMD_PAUSE_CHECKS,
|
||||
RARCH_CMD_MENU_SAVE_CONFIG,
|
||||
RARCH_CMD_MENU_PAUSE_LIBRETRO,
|
||||
EVENT_CMD_PAUSE,
|
||||
EVENT_CMD_PAUSE_CHECKS,
|
||||
EVENT_CMD_MENU_SAVE_CONFIG,
|
||||
EVENT_CMD_MENU_PAUSE_LIBRETRO,
|
||||
/* Toggles menu on/off. */
|
||||
RARCH_CMD_MENU_TOGGLE,
|
||||
EVENT_CMD_MENU_TOGGLE,
|
||||
/* Applies shader changes. */
|
||||
RARCH_CMD_SHADERS_APPLY_CHANGES,
|
||||
EVENT_CMD_SHADERS_APPLY_CHANGES,
|
||||
/* Initializes shader directory. */
|
||||
RARCH_CMD_SHADER_DIR_INIT,
|
||||
EVENT_CMD_SHADER_DIR_INIT,
|
||||
/* Deinitializes shader directory. */
|
||||
RARCH_CMD_SHADER_DIR_DEINIT,
|
||||
EVENT_CMD_SHADER_DIR_DEINIT,
|
||||
/* Initializes controllers. */
|
||||
RARCH_CMD_CONTROLLERS_INIT,
|
||||
RARCH_CMD_SAVEFILES,
|
||||
EVENT_CMD_CONTROLLERS_INIT,
|
||||
EVENT_CMD_SAVEFILES,
|
||||
/* Initializes savefiles. */
|
||||
RARCH_CMD_SAVEFILES_INIT,
|
||||
EVENT_CMD_SAVEFILES_INIT,
|
||||
/* Deinitializes savefiles. */
|
||||
RARCH_CMD_SAVEFILES_DEINIT,
|
||||
EVENT_CMD_SAVEFILES_DEINIT,
|
||||
/* Initializes message queue. */
|
||||
RARCH_CMD_MSG_QUEUE_INIT,
|
||||
EVENT_CMD_MSG_QUEUE_INIT,
|
||||
/* Deinitializes message queue. */
|
||||
RARCH_CMD_MSG_QUEUE_DEINIT,
|
||||
EVENT_CMD_MSG_QUEUE_DEINIT,
|
||||
/* Initializes cheats. */
|
||||
RARCH_CMD_CHEATS_INIT,
|
||||
EVENT_CMD_CHEATS_INIT,
|
||||
/* Deinitializes cheats. */
|
||||
RARCH_CMD_CHEATS_DEINIT,
|
||||
EVENT_CMD_CHEATS_DEINIT,
|
||||
/* Deinitializes network system. */
|
||||
RARCH_CMD_NETWORK_DEINIT,
|
||||
EVENT_CMD_NETWORK_DEINIT,
|
||||
/* Initializes network system. */
|
||||
RARCH_CMD_NETWORK_INIT,
|
||||
EVENT_CMD_NETWORK_INIT,
|
||||
/* Initializes netplay system. */
|
||||
RARCH_CMD_NETPLAY_INIT,
|
||||
EVENT_CMD_NETPLAY_INIT,
|
||||
/* Deinitializes netplay system. */
|
||||
RARCH_CMD_NETPLAY_DEINIT,
|
||||
EVENT_CMD_NETPLAY_DEINIT,
|
||||
/* Flip netplay players. */
|
||||
RARCH_CMD_NETPLAY_FLIP_PLAYERS,
|
||||
EVENT_CMD_NETPLAY_FLIP_PLAYERS,
|
||||
/* Initializes BSV movie. */
|
||||
RARCH_CMD_BSV_MOVIE_INIT,
|
||||
EVENT_CMD_BSV_MOVIE_INIT,
|
||||
/* Deinitializes BSV movie. */
|
||||
RARCH_CMD_BSV_MOVIE_DEINIT,
|
||||
EVENT_CMD_BSV_MOVIE_DEINIT,
|
||||
/* Initializes command interface. */
|
||||
RARCH_CMD_COMMAND_INIT,
|
||||
EVENT_CMD_COMMAND_INIT,
|
||||
/* Deinitialize command interface. */
|
||||
RARCH_CMD_COMMAND_DEINIT,
|
||||
EVENT_CMD_COMMAND_DEINIT,
|
||||
/* Deinitializes drivers. */
|
||||
RARCH_CMD_DRIVERS_DEINIT,
|
||||
EVENT_CMD_DRIVERS_DEINIT,
|
||||
/* Initializes drivers. */
|
||||
RARCH_CMD_DRIVERS_INIT,
|
||||
EVENT_CMD_DRIVERS_INIT,
|
||||
/* Reinitializes audio driver. */
|
||||
RARCH_CMD_AUDIO_REINIT,
|
||||
EVENT_CMD_AUDIO_REINIT,
|
||||
/* Resizes windowed scale. Will reinitialize video driver. */
|
||||
RARCH_CMD_RESIZE_WINDOWED_SCALE,
|
||||
EVENT_CMD_RESIZE_WINDOWED_SCALE,
|
||||
/* Deinitializes temporary content. */
|
||||
RARCH_CMD_TEMPORARY_CONTENT_DEINIT,
|
||||
RARCH_CMD_SUBSYSTEM_FULLPATHS_DEINIT,
|
||||
RARCH_CMD_LOG_FILE_DEINIT,
|
||||
EVENT_CMD_TEMPORARY_CONTENT_DEINIT,
|
||||
EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT,
|
||||
EVENT_CMD_LOG_FILE_DEINIT,
|
||||
/* Toggles disk eject. */
|
||||
RARCH_CMD_DISK_EJECT_TOGGLE,
|
||||
EVENT_CMD_DISK_EJECT_TOGGLE,
|
||||
/* Cycle to next disk. */
|
||||
RARCH_CMD_DISK_NEXT,
|
||||
EVENT_CMD_DISK_NEXT,
|
||||
/* Cycle to previous disk. */
|
||||
RARCH_CMD_DISK_PREV,
|
||||
EVENT_CMD_DISK_PREV,
|
||||
/* Stops rumbling. */
|
||||
RARCH_CMD_RUMBLE_STOP,
|
||||
EVENT_CMD_RUMBLE_STOP,
|
||||
/* Toggles mouse grab. */
|
||||
RARCH_CMD_GRAB_MOUSE_TOGGLE,
|
||||
EVENT_CMD_GRAB_MOUSE_TOGGLE,
|
||||
/* Toggles fullscreen mode. */
|
||||
RARCH_CMD_FULLSCREEN_TOGGLE,
|
||||
RARCH_CMD_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
RARCH_CMD_REMAPPING_INIT,
|
||||
RARCH_CMD_REMAPPING_DEINIT,
|
||||
RARCH_CMD_VOLUME_UP,
|
||||
RARCH_CMD_VOLUME_DOWN,
|
||||
RARCH_CMD_DATA_RUNLOOP_FREE,
|
||||
EVENT_CMD_FULLSCREEN_TOGGLE,
|
||||
EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
EVENT_CMD_REMAPPING_INIT,
|
||||
EVENT_CMD_REMAPPING_DEINIT,
|
||||
EVENT_CMD_VOLUME_UP,
|
||||
EVENT_CMD_VOLUME_DOWN,
|
||||
EVENT_CMD_DATA_RUNLOOP_FREE,
|
||||
};
|
||||
|
||||
enum action_state
|
||||
|
62
runloop.c
62
runloop.c
@ -54,7 +54,7 @@ static bool check_pause(bool pause_pressed, bool frameadvance_pressed)
|
||||
runloop_t *runloop = rarch_main_get_ptr();
|
||||
static bool old_focus = true;
|
||||
bool focus = true;
|
||||
unsigned cmd = RARCH_CMD_NONE;
|
||||
unsigned cmd = EVENT_CMD_NONE;
|
||||
bool old_is_paused = runloop->is_paused;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
@ -65,15 +65,15 @@ static bool check_pause(bool pause_pressed, bool frameadvance_pressed)
|
||||
focus = video_driver_has_focus();
|
||||
|
||||
if (focus && pause_pressed)
|
||||
cmd = RARCH_CMD_PAUSE_TOGGLE;
|
||||
cmd = EVENT_CMD_PAUSE_TOGGLE;
|
||||
else if (focus && !old_focus)
|
||||
cmd = RARCH_CMD_UNPAUSE;
|
||||
cmd = EVENT_CMD_UNPAUSE;
|
||||
else if (!focus && old_focus)
|
||||
cmd = RARCH_CMD_PAUSE;
|
||||
cmd = EVENT_CMD_PAUSE;
|
||||
|
||||
old_focus = focus;
|
||||
|
||||
if (cmd != RARCH_CMD_NONE)
|
||||
if (cmd != EVENT_CMD_NONE)
|
||||
rarch_main_command(cmd);
|
||||
|
||||
if (runloop->is_paused == old_is_paused)
|
||||
@ -320,7 +320,7 @@ static bool check_movie_record(void)
|
||||
RETRO_MSG_MOVIE_RECORD_STOPPING, 2, 180, true);
|
||||
RARCH_LOG(RETRO_LOG_MOVIE_RECORD_STOPPING);
|
||||
|
||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_BSV_MOVIE_DEINIT);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -342,7 +342,7 @@ static bool check_movie_playback(void)
|
||||
RETRO_MSG_MOVIE_PLAYBACK_ENDED, 1, 180, false);
|
||||
RARCH_LOG(RETRO_LOG_MOVIE_PLAYBACK_ENDED);
|
||||
|
||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_BSV_MOVIE_DEINIT);
|
||||
|
||||
global->bsv.movie_end = false;
|
||||
global->bsv.movie_playback = false;
|
||||
@ -449,16 +449,16 @@ static int do_pre_state_checks(rarch_cmd_state_t *cmd)
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (cmd->overlay_next_pressed)
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_NEXT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_NEXT);
|
||||
|
||||
if (!runloop->is_paused || runloop->is_menu)
|
||||
{
|
||||
if (cmd->fullscreen_toggle)
|
||||
rarch_main_command(RARCH_CMD_FULLSCREEN_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_FULLSCREEN_TOGGLE);
|
||||
}
|
||||
|
||||
if (cmd->grab_mouse_pressed)
|
||||
rarch_main_command(RARCH_CMD_GRAB_MOUSE_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_GRAB_MOUSE_TOGGLE);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (cmd->menu_pressed || (global->libretro_dummy))
|
||||
@ -474,10 +474,10 @@ static int do_netplay_state_checks(
|
||||
bool fullscreen_toggle)
|
||||
{
|
||||
if (netplay_flip_pressed)
|
||||
rarch_main_command(RARCH_CMD_NETPLAY_FLIP_PLAYERS);
|
||||
rarch_main_command(EVENT_CMD_NETPLAY_FLIP_PLAYERS);
|
||||
|
||||
if (fullscreen_toggle)
|
||||
rarch_main_command(RARCH_CMD_FULLSCREEN_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_FULLSCREEN_TOGGLE);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -496,7 +496,7 @@ static int do_pause_state_checks(
|
||||
|
||||
if (fullscreen_toggle_pressed)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_FULLSCREEN_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_FULLSCREEN_TOGGLE);
|
||||
rarch_render_cached_frame();
|
||||
}
|
||||
|
||||
@ -525,10 +525,10 @@ static int do_state_checks(rarch_cmd_state_t *cmd)
|
||||
return 1;
|
||||
|
||||
if (cmd->screenshot_pressed)
|
||||
rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT);
|
||||
rarch_main_command(EVENT_CMD_TAKE_SCREENSHOT);
|
||||
|
||||
if (cmd->mute_pressed)
|
||||
rarch_main_command(RARCH_CMD_AUDIO_MUTE_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_AUDIO_MUTE_TOGGLE);
|
||||
|
||||
if (cmd->osk_pressed)
|
||||
{
|
||||
@ -539,9 +539,9 @@ static int do_state_checks(rarch_cmd_state_t *cmd)
|
||||
}
|
||||
|
||||
if (cmd->volume_up_pressed)
|
||||
rarch_main_command(RARCH_CMD_VOLUME_UP);
|
||||
rarch_main_command(EVENT_CMD_VOLUME_UP);
|
||||
else if (cmd->volume_down_pressed)
|
||||
rarch_main_command(RARCH_CMD_VOLUME_DOWN);
|
||||
rarch_main_command(EVENT_CMD_VOLUME_DOWN);
|
||||
|
||||
#ifdef HAVE_NETPLAY
|
||||
if (driver->netplay_data)
|
||||
@ -561,9 +561,9 @@ static int do_state_checks(rarch_cmd_state_t *cmd)
|
||||
check_stateslots(cmd->state_slot_increase, cmd->state_slot_decrease);
|
||||
|
||||
if (cmd->save_state_pressed)
|
||||
rarch_main_command(RARCH_CMD_SAVE_STATE);
|
||||
rarch_main_command(EVENT_CMD_SAVE_STATE);
|
||||
else if (cmd->load_state_pressed)
|
||||
rarch_main_command(RARCH_CMD_LOAD_STATE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_STATE);
|
||||
|
||||
check_rewind(cmd->rewind_pressed);
|
||||
check_slowmotion(cmd->slowmotion_pressed);
|
||||
@ -574,14 +574,14 @@ static int do_state_checks(rarch_cmd_state_t *cmd)
|
||||
check_shader_dir(cmd->shader_next_pressed, cmd->shader_prev_pressed);
|
||||
|
||||
if (cmd->disk_eject_pressed)
|
||||
rarch_main_command(RARCH_CMD_DISK_EJECT_TOGGLE);
|
||||
rarch_main_command(EVENT_CMD_DISK_EJECT_TOGGLE);
|
||||
else if (cmd->disk_next_pressed)
|
||||
rarch_main_command(RARCH_CMD_DISK_NEXT);
|
||||
rarch_main_command(EVENT_CMD_DISK_NEXT);
|
||||
else if (cmd->disk_prev_pressed)
|
||||
rarch_main_command(RARCH_CMD_DISK_PREV);
|
||||
rarch_main_command(EVENT_CMD_DISK_PREV);
|
||||
|
||||
if (cmd->reset_pressed)
|
||||
rarch_main_command(RARCH_CMD_RESET);
|
||||
rarch_main_command(EVENT_CMD_RESET);
|
||||
|
||||
if (global->cheat)
|
||||
{
|
||||
@ -847,7 +847,7 @@ static int rarch_main_iterate_quit(void)
|
||||
if (global->core_shutdown_initiated
|
||||
&& settings->load_dummy_on_core_shutdown)
|
||||
{
|
||||
if (!rarch_main_command(RARCH_CMD_PREPARE_DUMMY))
|
||||
if (!rarch_main_command(EVENT_CMD_PREPARE_DUMMY))
|
||||
return -1;
|
||||
|
||||
global->core_shutdown_initiated = false;
|
||||
@ -868,19 +868,19 @@ static void rarch_main_iterate_linefeed_overlay(void)
|
||||
{
|
||||
driver->osk_enable = false;
|
||||
prev_overlay_restore = true;
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_DEINIT);
|
||||
return;
|
||||
}
|
||||
else if (!driver->osk_enable && driver->keyboard_linefeed_enable)
|
||||
{
|
||||
driver->osk_enable = true;
|
||||
prev_overlay_restore = false;
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_INIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_INIT);
|
||||
return;
|
||||
}
|
||||
else if (prev_overlay_restore)
|
||||
{
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_INIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_INIT);
|
||||
prev_overlay_restore = false;
|
||||
}
|
||||
}
|
||||
@ -952,10 +952,10 @@ void rarch_main_global_free(void)
|
||||
{
|
||||
global_t *global = NULL;
|
||||
|
||||
rarch_main_command(RARCH_CMD_TEMPORARY_CONTENT_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_SUBSYSTEM_FULLPATHS_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(RARCH_CMD_LOG_FILE_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_TEMPORARY_CONTENT_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_RECORD_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_LOG_FILE_DEINIT);
|
||||
|
||||
global = global_get_ptr();
|
||||
|
||||
|
90
settings.c
90
settings.c
@ -812,7 +812,7 @@ static void core_list_change_handler(void *data)
|
||||
rarch_setting_t *setting = (rarch_setting_t *)data;
|
||||
(void)setting;
|
||||
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CORE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -940,10 +940,10 @@ static int setting_bool_action_ok_exit(void *data, unsigned action)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
{
|
||||
rarch_main_command(setting->cmd_trigger.idx);
|
||||
rarch_main_command(RARCH_CMD_RESUME);
|
||||
rarch_main_command(EVENT_CMD_RESUME);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -958,7 +958,7 @@ static int setting_bool_action_ok_default(void *data, unsigned action)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
|
||||
return 0;
|
||||
@ -973,7 +973,7 @@ static int setting_uint_action_ok_default(void *data, unsigned action)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
|
||||
return 0;
|
||||
@ -995,10 +995,10 @@ static int setting_action_ok_video_refresh_rate_auto(
|
||||
{
|
||||
driver_set_refresh_rate(video_refresh_rate);
|
||||
/* Incase refresh rate update forced non-block video. */
|
||||
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
rarch_main_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
}
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
|
||||
return 0;
|
||||
@ -1013,7 +1013,7 @@ static int setting_fraction_action_ok_default(
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
setting->cmd_trigger.triggered = true;
|
||||
|
||||
return 0;
|
||||
@ -1053,7 +1053,7 @@ static int setting_action_action_ok(void *data, unsigned action)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
rarch_main_command(setting->cmd_trigger.idx);
|
||||
|
||||
return 0;
|
||||
@ -2997,7 +2997,7 @@ static void general_read_handler(void *data)
|
||||
|
||||
static void general_write_handler(void *data)
|
||||
{
|
||||
unsigned rarch_cmd = RARCH_CMD_NONE;
|
||||
unsigned rarch_cmd = EVENT_CMD_NONE;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
@ -3006,7 +3006,7 @@ static void general_write_handler(void *data)
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
||||
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
||||
{
|
||||
if (setting->flags & SD_FLAG_EXIT)
|
||||
{
|
||||
@ -3045,7 +3045,7 @@ static void general_write_handler(void *data)
|
||||
else if (!strcmp(setting->name, "pal60_enable"))
|
||||
{
|
||||
if (*setting->value.boolean && global->console.screen.pal_enable)
|
||||
rarch_cmd = RARCH_CMD_REINIT;
|
||||
rarch_cmd = EVENT_CMD_REINIT;
|
||||
else
|
||||
*setting->value.boolean = false;
|
||||
}
|
||||
@ -3073,7 +3073,7 @@ static void general_write_handler(void *data)
|
||||
else if (!strcmp(setting->name, "audio_volume"))
|
||||
global->audio_data.volume_gain = db_to_gain(*setting->value.fraction);
|
||||
else if (!strcmp(setting->name, "audio_latency"))
|
||||
rarch_cmd = RARCH_CMD_AUDIO_REINIT;
|
||||
rarch_cmd = EVENT_CMD_AUDIO_REINIT;
|
||||
else if (!strcmp(setting->name, "audio_rate_control_delta"))
|
||||
{
|
||||
if (*setting->value.fraction < 0.0005)
|
||||
@ -3096,7 +3096,7 @@ static void general_write_handler(void *data)
|
||||
driver_set_refresh_rate(*setting->value.fraction);
|
||||
|
||||
/* In case refresh rate update forced non-block video. */
|
||||
rarch_cmd = RARCH_CMD_VIDEO_SET_BLOCKING_STATE;
|
||||
rarch_cmd = EVENT_CMD_VIDEO_SET_BLOCKING_STATE;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(setting->name, "video_scale"))
|
||||
@ -3104,7 +3104,7 @@ static void general_write_handler(void *data)
|
||||
settings->video.scale = roundf(*setting->value.fraction);
|
||||
|
||||
if (!settings->video.fullscreen)
|
||||
rarch_cmd = RARCH_CMD_REINIT;
|
||||
rarch_cmd = EVENT_CMD_REINIT;
|
||||
}
|
||||
else if (!strcmp(setting->name, "input_player1_joypad_index"))
|
||||
settings->input.joypad_map[0] = *setting->value.integer;
|
||||
@ -3291,7 +3291,7 @@ static void load_content_change_handler(void *data)
|
||||
* crashes. I think it is because LOAD_CORE has not yet run. I'm not
|
||||
* sure the best way to test for that.
|
||||
*/
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(EVENT_CMD_LOAD_CONTENT);
|
||||
}
|
||||
|
||||
static void overlay_enable_toggle_change_handler(void *data)
|
||||
@ -3302,9 +3302,9 @@ static void overlay_enable_toggle_change_handler(void *data)
|
||||
return;
|
||||
|
||||
if (setting->value.boolean)
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_INIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_INIT);
|
||||
else
|
||||
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
||||
rarch_main_command(EVENT_CMD_OVERLAY_DEINIT);
|
||||
}
|
||||
|
||||
static bool setting_append_list_main_menu_options(
|
||||
@ -3386,7 +3386,7 @@ static bool setting_append_list_main_menu_options(
|
||||
"Unload Core",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_UNLOAD_CORE);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_UNLOAD_CORE);
|
||||
}
|
||||
|
||||
CONFIG_ACTION(
|
||||
@ -3433,7 +3433,7 @@ static bool setting_append_list_main_menu_options(
|
||||
(*list)[list_info->index - 1].action_start = &setting_action_start_savestates;
|
||||
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
||||
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_savestate;
|
||||
settings_list_current_add_cmd (list, list_info, RARCH_CMD_SAVE_STATE);
|
||||
settings_list_current_add_cmd (list, list_info, EVENT_CMD_SAVE_STATE);
|
||||
|
||||
CONFIG_ACTION(
|
||||
"loadstate",
|
||||
@ -3444,21 +3444,21 @@ static bool setting_append_list_main_menu_options(
|
||||
(*list)[list_info->index - 1].action_start = &setting_action_start_savestates;
|
||||
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
||||
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_savestate;
|
||||
settings_list_current_add_cmd (list, list_info, RARCH_CMD_LOAD_STATE);
|
||||
settings_list_current_add_cmd (list, list_info, EVENT_CMD_LOAD_STATE);
|
||||
|
||||
CONFIG_ACTION(
|
||||
"take_screenshot",
|
||||
"Take Screenshot",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd (list, list_info, RARCH_CMD_TAKE_SCREENSHOT);
|
||||
settings_list_current_add_cmd (list, list_info, EVENT_CMD_TAKE_SCREENSHOT);
|
||||
|
||||
CONFIG_ACTION(
|
||||
"resume_content",
|
||||
"Resume Content",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd (list, list_info, RARCH_CMD_RESUME);
|
||||
settings_list_current_add_cmd (list, list_info, EVENT_CMD_RESUME);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
||||
|
||||
CONFIG_ACTION(
|
||||
@ -3466,7 +3466,7 @@ static bool setting_append_list_main_menu_options(
|
||||
"Restart Content",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_RESET);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_RESET);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
||||
}
|
||||
#ifndef HAVE_DYNAMIC
|
||||
@ -3475,7 +3475,7 @@ static bool setting_append_list_main_menu_options(
|
||||
"Restart RetroArch",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_RESTART_RETROARCH);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_RESTART_RETROARCH);
|
||||
#endif
|
||||
|
||||
CONFIG_ACTION(
|
||||
@ -3489,7 +3489,7 @@ static bool setting_append_list_main_menu_options(
|
||||
"Save New Config",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_MENU_SAVE_CONFIG);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_SAVE_CONFIG);
|
||||
|
||||
CONFIG_ACTION(
|
||||
"help",
|
||||
@ -3505,7 +3505,7 @@ static bool setting_append_list_main_menu_options(
|
||||
"Quit RetroArch",
|
||||
group_info.name,
|
||||
subgroup_info.name);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_QUIT_RETROARCH);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_QUIT_RETROARCH);
|
||||
#endif
|
||||
|
||||
END_SUB_GROUP(list, list_info);
|
||||
@ -3740,7 +3740,7 @@ static bool setting_append_list_general_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REWIND_TOGGLE);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REWIND_TOGGLE);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
#if 0
|
||||
CONFIG_SIZE(
|
||||
@ -3791,7 +3791,7 @@ static bool setting_append_list_general_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_AUTOSAVE_INIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_AUTOSAVE_INIT);
|
||||
settings_list_current_add_range(list, list_info, 0, 0, 10, true, false);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
@ -3930,7 +3930,7 @@ static bool setting_append_list_video_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
||||
settings_list_current_add_range(list, list_info, 0, 1, 1, true, false);
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_video_monitor_index;
|
||||
@ -3948,7 +3948,7 @@ static bool setting_append_list_video_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
#endif
|
||||
CONFIG_BOOL(
|
||||
@ -4025,7 +4025,7 @@ static bool setting_append_list_video_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
||||
|
||||
END_SUB_GROUP(list, list_info);
|
||||
@ -4078,7 +4078,7 @@ static bool setting_append_list_video_options(
|
||||
settings_list_current_add_cmd(
|
||||
list,
|
||||
list_info,
|
||||
RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
settings_list_current_add_range(
|
||||
list,
|
||||
list_info,
|
||||
@ -4243,7 +4243,7 @@ static bool setting_append_list_video_options(
|
||||
settings_list_current_add_cmd(
|
||||
list,
|
||||
list_info,
|
||||
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
settings_list_current_add_range(
|
||||
list,
|
||||
list_info,
|
||||
@ -4276,7 +4276,7 @@ static bool setting_append_list_video_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
||||
#endif
|
||||
|
||||
@ -4301,7 +4301,7 @@ static bool setting_append_list_video_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
settings_list_current_add_range(list, list_info, 1, 4, 1, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
||||
|
||||
@ -4442,7 +4442,7 @@ static bool setting_append_list_video_options(
|
||||
settings_list_current_add_cmd(
|
||||
list,
|
||||
list_info,
|
||||
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX1
|
||||
@ -4732,7 +4732,7 @@ static bool setting_append_list_audio_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_values(list, list_info, "dsp");
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_DSP_FILTER_INIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_DSP_FILTER_INIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
||||
|
||||
END_SUB_GROUP(list, list_info);
|
||||
@ -5129,7 +5129,7 @@ static bool setting_append_list_overlay_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_values(list, list_info, "cfg");
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_INIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_INIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
||||
|
||||
CONFIG_FLOAT(
|
||||
@ -5142,7 +5142,7 @@ static bool setting_append_list_overlay_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_SET_ALPHA_MOD);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_ALPHA_MOD);
|
||||
settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
|
||||
@ -5156,7 +5156,7 @@ static bool setting_append_list_overlay_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_SET_SCALE_FACTOR);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_SCALE_FACTOR);
|
||||
settings_list_current_add_range(list, list_info, 0, 2, 0.01, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
|
||||
@ -5246,7 +5246,7 @@ static bool setting_append_list_menu_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_MENU_PAUSE_LIBRETRO);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_PAUSE_LIBRETRO);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
|
||||
CONFIG_BOOL(
|
||||
@ -5461,7 +5461,7 @@ static bool setting_append_list_ui_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
||||
|
||||
CONFIG_BOOL(
|
||||
@ -5982,7 +5982,7 @@ static bool setting_append_list_path_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_CORE_INFO_INIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT);
|
||||
settings_data_list_current_add_flags(
|
||||
list,
|
||||
list_info,
|
||||
@ -5998,7 +5998,7 @@ static bool setting_append_list_path_options(
|
||||
subgroup_info.name,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_list_current_add_cmd(list, list_info, RARCH_CMD_CORE_INFO_INIT);
|
||||
settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT);
|
||||
settings_data_list_current_add_flags(
|
||||
list,
|
||||
list_info,
|
||||
|
Loading…
x
Reference in New Issue
Block a user