From 2691ab0c7d93c541a14162658c6f11e433c86bd7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 9 May 2016 20:51:53 +0200 Subject: [PATCH] Rename command_event enums --- audio/audio_driver.c | 10 +- cheevos.c | 6 +- command.c | 290 ++++++++++++------------- command.h | 208 +++++++++--------- content.c | 6 +- driver.c | 12 +- dynamic.c | 2 +- frontend/drivers/platform_ctr.c | 2 +- frontend/drivers/platform_emscripten.c | 8 +- frontend/drivers/platform_psp.c | 2 +- frontend/frontend.c | 4 +- gfx/drivers/ctr_gfx.c | 4 +- gfx/video_driver.c | 14 +- input/drivers/android_input.c | 4 +- input/drivers_joypad/ctr_joypad.c | 2 +- menu/cbs/menu_cbs_left.c | 2 +- menu/cbs/menu_cbs_ok.c | 48 ++-- menu/cbs/menu_cbs_right.c | 2 +- menu/cbs/menu_cbs_start.c | 2 +- menu/drivers/nuklear.c | 2 +- menu/drivers/zarch.c | 2 +- menu/menu_content.c | 4 +- menu/menu_displaylist.c | 2 +- menu/menu_driver.c | 16 +- menu/menu_setting.c | 88 ++++---- network/netplay.c | 6 +- record/record_driver.c | 8 +- retroarch.c | 58 ++--- runloop.c | 58 ++--- tasks/task_content.c | 12 +- ui/drivers/ui_cocoa.m | 32 +-- ui/drivers/ui_cocoatouch.m | 8 +- ui/drivers/ui_win32.c | 34 +-- 33 files changed, 479 insertions(+), 479 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 1ef8145a3c..0239b80e00 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -297,7 +297,7 @@ static bool uninit_audio(void) free(audio_driver_data.output_samples.buf); audio_driver_data.output_samples.buf = NULL; - command_event(EVENT_CMD_DSP_FILTER_DEINIT, NULL); + command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL); compute_audio_buffer_statistics(); @@ -380,7 +380,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited) if (!settings->audio.sync && audio_driver_is_active()) { - command_event(EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE, NULL); + command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL); audio_driver_data.chunk.size = audio_driver_data.chunk.nonblock_size; } @@ -438,7 +438,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited) RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n"); } - command_event(EVENT_CMD_DSP_FILTER_INIT, NULL); + command_event(CMD_EVENT_DSP_FILTER_INIT, NULL); audio_driver_data.free_samples.count = 0; @@ -928,8 +928,8 @@ bool audio_driver_toggle_mute(void) settings->audio.mute_enable = !settings->audio.mute_enable; if (settings->audio.mute_enable) - command_event(EVENT_CMD_AUDIO_STOP, NULL); - else if (!command_event(EVENT_CMD_AUDIO_START, NULL)) + command_event(CMD_EVENT_AUDIO_STOP, NULL); + else if (!command_event(CMD_EVENT_AUDIO_START, NULL)) { audio_driver_unset_active(); return false; diff --git a/cheevos.c b/cheevos.c index c3bc001a5f..e4358f8b7d 100644 --- a/cheevos.c +++ b/cheevos.c @@ -2214,9 +2214,9 @@ bool cheevos_toggle_hardcore_mode(void) if (settings->cheevos.hardcore_mode_enable) { /* send reset core cmd to avoid any user savestate previusly loaded */ - command_event(EVENT_CMD_RESET, NULL); + command_event(CMD_EVENT_RESET, NULL); if (settings->rewind_enable) - command_event(EVENT_CMD_REWIND_DEINIT, NULL); + command_event(CMD_EVENT_REWIND_DEINIT, NULL); RARCH_LOG("%s\n", msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE)); runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE), 0, 3 * 60, true); @@ -2224,7 +2224,7 @@ bool cheevos_toggle_hardcore_mode(void) else { if (settings->rewind_enable) - command_event(EVENT_CMD_REWIND_INIT, NULL); + command_event(CMD_EVENT_REWIND_INIT, NULL); } return true; diff --git a/command.c b/command.c index 57b688764c..9052d64947 100644 --- a/command.c +++ b/command.c @@ -847,7 +847,7 @@ static bool command_event_disk_control_append_image(const char *path) RARCH_LOG("%s\n", msg); runloop_msg_queue_push(msg, 0, 180, true); - command_event(EVENT_CMD_AUTOSAVE_DEINIT, NULL); + command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL); /* TODO: Need to figure out what to do with subsystems case. */ if (!*global->subsystem) @@ -860,7 +860,7 @@ static bool command_event_disk_control_append_image(const char *path) rarch_ctl(RARCH_CTL_FILL_PATHNAMES, NULL); } - command_event(EVENT_CMD_AUTOSAVE_INIT, NULL); + command_event(CMD_EVENT_AUTOSAVE_INIT, NULL); command_event_disk_control_set_index(new_idx); command_event_disk_control_set_eject(false, false); @@ -1206,8 +1206,8 @@ static bool event_init_content(void) msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD)); command_event_load_auto_state(); - command_event(EVENT_CMD_BSV_MOVIE_INIT, NULL); - command_event(EVENT_CMD_NETPLAY_INIT, NULL); + command_event(CMD_EVENT_BSV_MOVIE_INIT, NULL); + command_event(CMD_EVENT_NETPLAY_INIT, NULL); return true; } @@ -1516,10 +1516,10 @@ static void command_event_main_state(unsigned cmd) { switch (cmd) { - case EVENT_CMD_SAVE_STATE: + case CMD_EVENT_SAVE_STATE: command_event_save_state(path, msg, sizeof(msg)); break; - case EVENT_CMD_LOAD_STATE: + case CMD_EVENT_LOAD_STATE: command_event_load_state(path, msg, sizeof(msg)); break; } @@ -1576,17 +1576,17 @@ bool command_event(enum event_command cmd, void *data) switch (cmd) { - case EVENT_CMD_MENU_REFRESH: + case CMD_EVENT_MENU_REFRESH: #ifdef HAVE_MENU menu_driver_ctl(RARCH_MENU_CTL_REFRESH, NULL); #endif break; - case EVENT_CMD_SET_PER_GAME_RESOLUTION: + case CMD_EVENT_SET_PER_GAME_RESOLUTION: #if defined(GEKKO) { unsigned width = 0, height = 0; - command_event(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL); + command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL); if (video_driver_get_video_output_size(&width, &height)) { @@ -1603,40 +1603,40 @@ bool command_event(enum event_command cmd, void *data) } #endif break; - case EVENT_CMD_LOAD_CONTENT_PERSIST: + case CMD_EVENT_LOAD_CONTENT_PERSIST: #ifdef HAVE_DYNAMIC - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); #endif rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL); break; #ifdef HAVE_FFMPEG - case EVENT_CMD_LOAD_CONTENT_FFMPEG: + case CMD_EVENT_LOAD_CONTENT_FFMPEG: rarch_ctl(RARCH_CTL_LOAD_CONTENT_FFMPEG, NULL); break; #endif - case EVENT_CMD_LOAD_CONTENT_IMAGEVIEWER: + case CMD_EVENT_LOAD_CONTENT_IMAGEVIEWER: rarch_ctl(RARCH_CTL_LOAD_CONTENT_IMAGEVIEWER, NULL); break; - case EVENT_CMD_LOAD_CONTENT: + case CMD_EVENT_LOAD_CONTENT: { #ifdef HAVE_DYNAMIC - command_event(EVENT_CMD_LOAD_CONTENT_PERSIST, NULL); + command_event(CMD_EVENT_LOAD_CONTENT_PERSIST, NULL); #else char *fullpath = NULL; runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, settings->path.libretro); - command_event(EVENT_CMD_EXEC, (void*)fullpath); - command_event(EVENT_CMD_QUIT, NULL); + command_event(CMD_EVENT_EXEC, (void*)fullpath); + command_event(CMD_EVENT_QUIT, NULL); #endif } break; - case EVENT_CMD_LOAD_CORE_DEINIT: + case CMD_EVENT_LOAD_CORE_DEINIT: #ifdef HAVE_MENU menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_DEINIT, NULL); #endif break; - case EVENT_CMD_LOAD_CORE_PERSIST: - command_event(EVENT_CMD_LOAD_CORE_DEINIT, NULL); + case CMD_EVENT_LOAD_CORE_PERSIST: + command_event(CMD_EVENT_LOAD_CORE_DEINIT, NULL); { #ifdef HAVE_MENU bool *ptr = NULL; @@ -1667,13 +1667,13 @@ bool command_event(enum event_command cmd, void *data) #endif } break; - case EVENT_CMD_LOAD_CORE: - command_event(EVENT_CMD_LOAD_CORE_PERSIST, NULL); + case CMD_EVENT_LOAD_CORE: + command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL); #ifndef HAVE_DYNAMIC - command_event(EVENT_CMD_QUIT, NULL); + command_event(CMD_EVENT_QUIT, NULL); #endif break; - case EVENT_CMD_LOAD_STATE: + case CMD_EVENT_LOAD_STATE: /* Immutable - disallow savestate load when * we absolutely cannot change game state. */ if (bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) @@ -1691,7 +1691,7 @@ bool command_event(enum event_command cmd, void *data) command_event_main_state(cmd); break; - case EVENT_CMD_RESIZE_WINDOWED_SCALE: + case CMD_EVENT_RESIZE_WINDOWED_SCALE: { unsigned idx = 0; unsigned *window_scale = NULL; @@ -1704,12 +1704,12 @@ bool command_event(enum event_command cmd, void *data) settings->video.scale = *window_scale; if (!settings->video.fullscreen) - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); runloop_ctl(RUNLOOP_CTL_SET_WINDOWED_SCALE, &idx); } break; - case EVENT_CMD_MENU_TOGGLE: + case CMD_EVENT_MENU_TOGGLE: #ifdef HAVE_MENU if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL); @@ -1717,10 +1717,10 @@ bool command_event(enum event_command cmd, void *data) rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL); #endif break; - case EVENT_CMD_CONTROLLERS_INIT: + case CMD_EVENT_CONTROLLERS_INIT: command_event_init_controllers(); break; - case EVENT_CMD_RESET: + case CMD_EVENT_RESET: RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET)); runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true); @@ -1729,7 +1729,7 @@ bool command_event(enum event_command cmd, void *data) #endif core_reset(); break; - case EVENT_CMD_SAVE_STATE: + case CMD_EVENT_SAVE_STATE: #ifdef HAVE_CHEEVOS if (settings->cheevos.hardcore_mode_enable) return false; @@ -1740,31 +1740,31 @@ bool command_event(enum event_command cmd, void *data) command_event_main_state(cmd); break; - case EVENT_CMD_SAVE_STATE_DECREMENT: + case CMD_EVENT_SAVE_STATE_DECREMENT: /* Slot -1 is (auto) slot. */ if (settings->state_slot >= 0) settings->state_slot--; break; - case EVENT_CMD_SAVE_STATE_INCREMENT: + case CMD_EVENT_SAVE_STATE_INCREMENT: settings->state_slot++; break; - case EVENT_CMD_TAKE_SCREENSHOT: + case CMD_EVENT_TAKE_SCREENSHOT: if (!take_screenshot()) return false; break; - case EVENT_CMD_UNLOAD_CORE: + case CMD_EVENT_UNLOAD_CORE: runloop_ctl(RUNLOOP_CTL_PREPARE_DUMMY, NULL); - command_event(EVENT_CMD_LOAD_CORE_DEINIT, NULL); + command_event(CMD_EVENT_LOAD_CORE_DEINIT, NULL); break; - case EVENT_CMD_QUIT: + case CMD_EVENT_QUIT: rarch_ctl(RARCH_CTL_QUIT, NULL); break; - case EVENT_CMD_CHEEVOS_HARDCORE_MODE_TOGGLE: + case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE: #ifdef HAVE_CHEEVOS cheevos_toggle_hardcore_mode(); #endif break; - case EVENT_CMD_REINIT: + case CMD_EVENT_REINIT: { struct retro_hw_render_callback *hwr = video_driver_get_hw_context(); @@ -1775,7 +1775,7 @@ bool command_event(enum event_command cmd, void *data) video_driver_unset_video_cache_context(); video_driver_unset_video_cache_context_ack(); - command_event(EVENT_CMD_RESET_CONTEXT, NULL); + command_event(CMD_EVENT_RESET_CONTEXT, NULL); video_driver_unset_video_cache_context(); /* Poll input to avoid possibly stale data to corrupt things. */ @@ -1784,21 +1784,21 @@ bool command_event(enum event_command cmd, void *data) #ifdef HAVE_MENU menu_display_set_framebuffer_dirty_flag(); if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) - command_event(EVENT_CMD_VIDEO_SET_BLOCKING_STATE, NULL); + command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL); #endif } break; - case EVENT_CMD_CHEATS_DEINIT: + case CMD_EVENT_CHEATS_DEINIT: cheat_manager_state_free(); break; - case EVENT_CMD_CHEATS_INIT: - command_event(EVENT_CMD_CHEATS_DEINIT, NULL); + case CMD_EVENT_CHEATS_INIT: + command_event(CMD_EVENT_CHEATS_DEINIT, NULL); command_event_init_cheats(); break; - case EVENT_CMD_CHEATS_APPLY: + case CMD_EVENT_CHEATS_APPLY: cheat_manager_apply_cheats(); break; - case EVENT_CMD_REWIND_DEINIT: + case CMD_EVENT_REWIND_DEINIT: #ifdef HAVE_NETPLAY if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) return false; @@ -1810,7 +1810,7 @@ bool command_event(enum event_command cmd, void *data) state_manager_event_deinit(); break; - case EVENT_CMD_REWIND_INIT: + case CMD_EVENT_REWIND_INIT: #ifdef HAVE_CHEEVOS if (settings->cheevos.hardcore_mode_enable) return false; @@ -1820,13 +1820,13 @@ bool command_event(enum event_command cmd, void *data) #endif state_manager_event_init(); break; - case EVENT_CMD_REWIND_TOGGLE: + case CMD_EVENT_REWIND_TOGGLE: if (settings->rewind_enable) - command_event(EVENT_CMD_REWIND_INIT, NULL); + command_event(CMD_EVENT_REWIND_INIT, NULL); else - command_event(EVENT_CMD_REWIND_DEINIT, NULL); + command_event(CMD_EVENT_REWIND_DEINIT, NULL); break; - case EVENT_CMD_AUTOSAVE_DEINIT: + case CMD_EVENT_AUTOSAVE_DEINIT: #ifdef HAVE_THREADS { global_t *global = global_get_ptr(); @@ -1836,23 +1836,23 @@ bool command_event(enum event_command cmd, void *data) } #endif break; - case EVENT_CMD_AUTOSAVE_INIT: - command_event(EVENT_CMD_AUTOSAVE_DEINIT, NULL); + case CMD_EVENT_AUTOSAVE_INIT: + command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL); #ifdef HAVE_THREADS autosave_init(); #endif break; - case EVENT_CMD_AUTOSAVE_STATE: + case CMD_EVENT_AUTOSAVE_STATE: event_save_auto_state(); break; - case EVENT_CMD_AUDIO_STOP: + case CMD_EVENT_AUDIO_STOP: if (!audio_driver_alive()) return false; if (!audio_driver_stop()) return false; break; - case EVENT_CMD_AUDIO_START: + case CMD_EVENT_AUDIO_START: if (audio_driver_alive()) return false; @@ -1863,7 +1863,7 @@ bool command_event(enum event_command cmd, void *data) audio_driver_unset_active(); } break; - case EVENT_CMD_AUDIO_MUTE_TOGGLE: + case CMD_EVENT_AUDIO_MUTE_TOGGLE: { const char *msg = !settings->audio.mute_enable ? msg_hash_to_str(MSG_AUDIO_MUTED): @@ -1880,44 +1880,44 @@ bool command_event(enum event_command cmd, void *data) RARCH_LOG("%s\n", msg); } break; - case EVENT_CMD_OVERLAY_DEINIT: + case CMD_EVENT_OVERLAY_DEINIT: #ifdef HAVE_OVERLAY input_overlay_free(); #endif break; - case EVENT_CMD_OVERLAY_INIT: - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + case CMD_EVENT_OVERLAY_INIT: + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); #ifdef HAVE_OVERLAY input_overlay_init(); #endif break; - case EVENT_CMD_OVERLAY_NEXT: + case CMD_EVENT_OVERLAY_NEXT: #ifdef HAVE_OVERLAY input_overlay_next(settings->input.overlay_opacity); #endif break; - case EVENT_CMD_DSP_FILTER_DEINIT: + case CMD_EVENT_DSP_FILTER_DEINIT: audio_driver_dsp_filter_free(); break; - case EVENT_CMD_DSP_FILTER_INIT: - command_event(EVENT_CMD_DSP_FILTER_DEINIT, NULL); + case CMD_EVENT_DSP_FILTER_INIT: + command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL); if (!*settings->path.audio_dsp_plugin) break; audio_driver_dsp_filter_init(settings->path.audio_dsp_plugin); break; - case EVENT_CMD_GPU_RECORD_DEINIT: + case CMD_EVENT_GPU_RECORD_DEINIT: video_driver_gpu_record_deinit(); break; - case EVENT_CMD_RECORD_DEINIT: + case CMD_EVENT_RECORD_DEINIT: if (!recording_deinit()) return false; break; - case EVENT_CMD_RECORD_INIT: - command_event(EVENT_CMD_HISTORY_DEINIT, NULL); + case CMD_EVENT_RECORD_INIT: + command_event(CMD_EVENT_HISTORY_DEINIT, NULL); if (!recording_init()) return false; break; - case EVENT_CMD_HISTORY_DEINIT: + case CMD_EVENT_HISTORY_DEINIT: if (g_defaults.history) { content_playlist_write_file(g_defaults.history); @@ -1925,8 +1925,8 @@ bool command_event(enum event_command cmd, void *data) } g_defaults.history = NULL; break; - case EVENT_CMD_HISTORY_INIT: - command_event(EVENT_CMD_HISTORY_DEINIT, NULL); + case CMD_EVENT_HISTORY_INIT: + command_event(CMD_EVENT_HISTORY_DEINIT, NULL); if (!settings->history_list_enable) return false; RARCH_LOG("%s: [%s].\n", @@ -1936,16 +1936,16 @@ bool command_event(enum event_command cmd, void *data) settings->path.content_history, settings->content_history_size); break; - case EVENT_CMD_CORE_INFO_DEINIT: + case CMD_EVENT_CORE_INFO_DEINIT: core_info_deinit_list(); break; - case EVENT_CMD_CORE_INFO_INIT: - command_event(EVENT_CMD_CORE_INFO_DEINIT, NULL); + case CMD_EVENT_CORE_INFO_INIT: + command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL); if (*settings->directory.libretro) core_info_init_list(); break; - case EVENT_CMD_CORE_DEINIT: + case CMD_EVENT_CORE_DEINIT: { struct retro_hw_render_callback *hwr = video_driver_get_hw_context(); @@ -1956,44 +1956,44 @@ bool command_event(enum event_command cmd, void *data) break; } - case EVENT_CMD_CORE_INIT: + case CMD_EVENT_CORE_INIT: if (!event_init_core((enum rarch_core_type*)data)) return false; break; - case EVENT_CMD_VIDEO_APPLY_STATE_CHANGES: + case CMD_EVENT_VIDEO_APPLY_STATE_CHANGES: video_driver_apply_state_changes(); break; - case EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE: + case CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE: boolean = true; /* fall-through */ - case EVENT_CMD_VIDEO_SET_BLOCKING_STATE: + case CMD_EVENT_VIDEO_SET_BLOCKING_STATE: video_driver_set_nonblock_state(boolean); break; - case EVENT_CMD_VIDEO_SET_ASPECT_RATIO: + case CMD_EVENT_VIDEO_SET_ASPECT_RATIO: video_driver_set_aspect_ratio(); break; - case EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE: + case CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE: boolean = true; /* fall-through */ - case EVENT_CMD_AUDIO_SET_BLOCKING_STATE: + case CMD_EVENT_AUDIO_SET_BLOCKING_STATE: audio_driver_set_nonblocking_state(boolean); break; - case EVENT_CMD_OVERLAY_SET_SCALE_FACTOR: + case CMD_EVENT_OVERLAY_SET_SCALE_FACTOR: #ifdef HAVE_OVERLAY input_overlay_set_scale_factor(settings->input.overlay_scale); #endif break; - case EVENT_CMD_OVERLAY_SET_ALPHA_MOD: + case CMD_EVENT_OVERLAY_SET_ALPHA_MOD: #ifdef HAVE_OVERLAY input_overlay_set_alpha_mod(settings->input.overlay_opacity); #endif break; - case EVENT_CMD_AUDIO_REINIT: + case CMD_EVENT_AUDIO_REINIT: { int flags = DRIVER_AUDIO; driver_ctl(RARCH_DRIVER_CTL_UNINIT, &flags); driver_ctl(RARCH_DRIVER_CTL_INIT, &flags); } break; - case EVENT_CMD_RESET_CONTEXT: + case CMD_EVENT_RESET_CONTEXT: { /* RARCH_DRIVER_CTL_UNINIT clears the callback struct so we * need to make sure to keep a copy */ @@ -2011,49 +2011,49 @@ bool command_event(enum event_command cmd, void *data) driver_ctl(RARCH_DRIVER_CTL_INIT, &flags); } break; - case EVENT_CMD_QUIT_RETROARCH: + case CMD_EVENT_QUIT_RETROARCH: rarch_ctl(RARCH_CTL_FORCE_QUIT, NULL); break; - case EVENT_CMD_SHUTDOWN: + case CMD_EVENT_SHUTDOWN: #if defined(__linux__) && !defined(ANDROID) runloop_msg_queue_push("Shutting down...", 1, 180, true); rarch_ctl(RARCH_CTL_FORCE_QUIT, NULL); system("shutdown -P now"); #endif break; - case EVENT_CMD_REBOOT: + case CMD_EVENT_REBOOT: #if defined(__linux__) && !defined(ANDROID) runloop_msg_queue_push("Rebooting...", 1, 180, true); rarch_ctl(RARCH_CTL_FORCE_QUIT, NULL); system("shutdown -r now"); #endif break; - case EVENT_CMD_RESUME: + case CMD_EVENT_RESUME: rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL); if (ui_companion_is_on_foreground()) ui_companion_driver_toggle(); break; - case EVENT_CMD_RESTART_RETROARCH: + case CMD_EVENT_RESTART_RETROARCH: if (!frontend_driver_set_fork(FRONTEND_FORK_RESTART)) return false; break; - case EVENT_CMD_MENU_SAVE_CURRENT_CONFIG: + case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG: command_event_save_current_config(); break; - case EVENT_CMD_MENU_SAVE_CONFIG: + case CMD_EVENT_MENU_SAVE_CONFIG: if (!command_event_save_core_config()) return false; break; - case EVENT_CMD_SHADERS_APPLY_CHANGES: + case CMD_EVENT_SHADERS_APPLY_CHANGES: #ifdef HAVE_MENU menu_shader_manager_apply_changes(); #endif break; - case EVENT_CMD_PAUSE_CHECKS: + case CMD_EVENT_PAUSE_CHECKS: if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) { RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED)); - command_event(EVENT_CMD_AUDIO_STOP, NULL); + command_event(CMD_EVENT_AUDIO_STOP, NULL); if (settings->video.black_frame_insertion) video_driver_cached_frame_render(); @@ -2061,53 +2061,53 @@ bool command_event(enum event_command cmd, void *data) else { RARCH_LOG("%s\n", msg_hash_to_str(MSG_UNPAUSED)); - command_event(EVENT_CMD_AUDIO_START, NULL); + command_event(CMD_EVENT_AUDIO_START, NULL); } break; - case EVENT_CMD_PAUSE_TOGGLE: + case CMD_EVENT_PAUSE_TOGGLE: boolean = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); boolean = !boolean; runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean); - command_event(EVENT_CMD_PAUSE_CHECKS, NULL); + command_event(CMD_EVENT_PAUSE_CHECKS, NULL); break; - case EVENT_CMD_UNPAUSE: + case CMD_EVENT_UNPAUSE: boolean = false; runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean); - command_event(EVENT_CMD_PAUSE_CHECKS, NULL); + command_event(CMD_EVENT_PAUSE_CHECKS, NULL); break; - case EVENT_CMD_PAUSE: + case CMD_EVENT_PAUSE: boolean = true; runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean); - command_event(EVENT_CMD_PAUSE_CHECKS, NULL); + command_event(CMD_EVENT_PAUSE_CHECKS, NULL); break; - case EVENT_CMD_MENU_PAUSE_LIBRETRO: + case CMD_EVENT_MENU_PAUSE_LIBRETRO: #ifdef HAVE_MENU if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { if (settings->menu.pause_libretro) - command_event(EVENT_CMD_AUDIO_STOP, NULL); + command_event(CMD_EVENT_AUDIO_STOP, NULL); else - command_event(EVENT_CMD_AUDIO_START, NULL); + command_event(CMD_EVENT_AUDIO_START, NULL); } else { if (settings->menu.pause_libretro) - command_event(EVENT_CMD_AUDIO_START, NULL); + command_event(CMD_EVENT_AUDIO_START, NULL); } #endif break; - case EVENT_CMD_SHADER_DIR_DEINIT: + case CMD_EVENT_SHADER_DIR_DEINIT: runloop_ctl(RUNLOOP_CTL_SHADER_DIR_DEINIT, NULL); break; - case EVENT_CMD_SHADER_DIR_INIT: - command_event(EVENT_CMD_SHADER_DIR_DEINIT, NULL); + case CMD_EVENT_SHADER_DIR_INIT: + command_event(CMD_EVENT_SHADER_DIR_DEINIT, NULL); if (!runloop_ctl(RUNLOOP_CTL_SHADER_DIR_INIT, NULL)) return false; break; - case EVENT_CMD_SAVEFILES: + case CMD_EVENT_SAVEFILES: { global_t *global = global_get_ptr(); if (!global->savefiles || !global->sram.use) @@ -2128,7 +2128,7 @@ bool command_event(enum event_command cmd, void *data) } } return true; - case EVENT_CMD_SAVEFILES_DEINIT: + case CMD_EVENT_SAVEFILES_DEINIT: { global_t *global = global_get_ptr(); if (!global) @@ -2139,7 +2139,7 @@ bool command_event(enum event_command cmd, void *data) global->savefiles = NULL; } break; - case EVENT_CMD_SAVEFILES_INIT: + case CMD_EVENT_SAVEFILES_INIT: { global_t *global = global_get_ptr(); global->sram.use = global->sram.use && !global->sram.save_disable; @@ -2154,70 +2154,70 @@ bool command_event(enum event_command cmd, void *data) msg_hash_to_str(MSG_SRAM_WILL_NOT_BE_SAVED)); if (global->sram.use) - command_event(EVENT_CMD_AUTOSAVE_INIT, NULL); + command_event(CMD_EVENT_AUTOSAVE_INIT, NULL); } break; - case EVENT_CMD_BSV_MOVIE_DEINIT: + case CMD_EVENT_BSV_MOVIE_DEINIT: bsv_movie_ctl(BSV_MOVIE_CTL_DEINIT, NULL); break; - case EVENT_CMD_BSV_MOVIE_INIT: - command_event(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); + case CMD_EVENT_BSV_MOVIE_INIT: + command_event(CMD_EVENT_BSV_MOVIE_DEINIT, NULL); bsv_movie_ctl(BSV_MOVIE_CTL_INIT, NULL); break; - case EVENT_CMD_NETPLAY_DEINIT: + case CMD_EVENT_NETPLAY_DEINIT: #ifdef HAVE_NETPLAY deinit_netplay(); #endif break; - case EVENT_CMD_NETWORK_DEINIT: + case CMD_EVENT_NETWORK_DEINIT: #ifdef HAVE_NETWORKING network_deinit(); #endif break; - case EVENT_CMD_NETWORK_INIT: + case CMD_EVENT_NETWORK_INIT: #ifdef HAVE_NETWORKING network_init(); #endif break; - case EVENT_CMD_NETPLAY_INIT: - command_event(EVENT_CMD_NETPLAY_DEINIT, NULL); + case CMD_EVENT_NETPLAY_INIT: + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); #ifdef HAVE_NETPLAY if (!init_netplay()) return false; #endif break; - case EVENT_CMD_NETPLAY_FLIP_PLAYERS: + case CMD_EVENT_NETPLAY_FLIP_PLAYERS: #ifdef HAVE_NETPLAY netplay_driver_ctl(RARCH_NETPLAY_CTL_FLIP_PLAYERS, NULL); #endif break; - case EVENT_CMD_FULLSCREEN_TOGGLE: + case CMD_EVENT_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; - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); break; - case EVENT_CMD_COMMAND_DEINIT: + case CMD_EVENT_COMMAND_DEINIT: input_driver_deinit_command(); break; - case EVENT_CMD_COMMAND_INIT: - command_event(EVENT_CMD_COMMAND_DEINIT, NULL); + case CMD_EVENT_COMMAND_INIT: + command_event(CMD_EVENT_COMMAND_DEINIT, NULL); input_driver_init_command(); break; - case EVENT_CMD_REMOTE_DEINIT: + case CMD_EVENT_REMOTE_DEINIT: input_driver_deinit_remote(); break; - case EVENT_CMD_REMOTE_INIT: - command_event(EVENT_CMD_REMOTE_DEINIT, NULL); + case CMD_EVENT_REMOTE_INIT: + command_event(CMD_EVENT_REMOTE_DEINIT, NULL); input_driver_init_remote(); break; - case EVENT_CMD_TEMPORARY_CONTENT_DEINIT: + case CMD_EVENT_TEMPORARY_CONTENT_DEINIT: content_deinit(); break; - case EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT: + case CMD_EVENT_SUBSYSTEM_FULLPATHS_DEINIT: { global_t *global = global_get_ptr(); if (!global) @@ -2228,17 +2228,17 @@ bool command_event(enum event_command cmd, void *data) global->subsystem_fullpaths = NULL; } break; - case EVENT_CMD_LOG_FILE_DEINIT: + case CMD_EVENT_LOG_FILE_DEINIT: retro_main_log_file_deinit(); break; - case EVENT_CMD_DISK_APPEND_IMAGE: + case CMD_EVENT_DISK_APPEND_IMAGE: { const char *path = (const char*)data; if (string_is_empty(path)) return false; return command_event_disk_control_append_image(path); } - case EVENT_CMD_DISK_EJECT_TOGGLE: + case CMD_EVENT_DISK_EJECT_TOGGLE: if (info && info->disk_control_cb.get_num_images) { const struct retro_disk_control_callback *control = @@ -2256,7 +2256,7 @@ bool command_event(enum event_command cmd, void *data) msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; - case EVENT_CMD_DISK_NEXT: + case CMD_EVENT_DISK_NEXT: if (info && info->disk_control_cb.get_num_images) { const struct retro_disk_control_callback *control = @@ -2276,7 +2276,7 @@ bool command_event(enum event_command cmd, void *data) msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; - case EVENT_CMD_DISK_PREV: + case CMD_EVENT_DISK_PREV: if (info && info->disk_control_cb.get_num_images) { const struct retro_disk_control_callback *control = @@ -2296,14 +2296,14 @@ bool command_event(enum event_command cmd, void *data) msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; - case EVENT_CMD_RUMBLE_STOP: + case CMD_EVENT_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 EVENT_CMD_GRAB_MOUSE_TOGGLE: + case CMD_EVENT_GRAB_MOUSE_TOGGLE: { bool ret = false; static bool grab_mouse_state = false; @@ -2328,21 +2328,21 @@ bool command_event(enum event_command cmd, void *data) video_driver_show_mouse(); } break; - case EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG: + case CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG: rarch_perf_log(); break; - case EVENT_CMD_VOLUME_UP: + case CMD_EVENT_VOLUME_UP: command_event_set_volume(0.5f); break; - case EVENT_CMD_VOLUME_DOWN: + case CMD_EVENT_VOLUME_DOWN: command_event_set_volume(-0.5f); break; - case EVENT_CMD_SET_FRAME_LIMIT: + case CMD_EVENT_SET_FRAME_LIMIT: runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); break; - case EVENT_CMD_EXEC: + case CMD_EVENT_EXEC: return command_event_cmd_exec(data); - case EVENT_CMD_NONE: + case CMD_EVENT_NONE: default: return false; } diff --git a/command.h b/command.h index 522395b4b6..1df2d737aa 100644 --- a/command.h +++ b/command.h @@ -32,187 +32,187 @@ typedef struct command command_t; enum event_command { - EVENT_CMD_NONE = 0, + CMD_EVENT_NONE = 0, /* Resets RetroArch. */ - EVENT_CMD_RESET, + CMD_EVENT_RESET, /* Loads content file. */ - EVENT_CMD_LOAD_CONTENT, - EVENT_CMD_LOAD_CONTENT_PERSIST, + CMD_EVENT_LOAD_CONTENT, + CMD_EVENT_LOAD_CONTENT_PERSIST, #ifdef HAVE_FFMPEG - EVENT_CMD_LOAD_CONTENT_FFMPEG, + CMD_EVENT_LOAD_CONTENT_FFMPEG, #endif - EVENT_CMD_LOAD_CONTENT_IMAGEVIEWER, - EVENT_CMD_SET_PER_GAME_RESOLUTION, - EVENT_CMD_SET_FRAME_LIMIT, + CMD_EVENT_LOAD_CONTENT_IMAGEVIEWER, + CMD_EVENT_SET_PER_GAME_RESOLUTION, + CMD_EVENT_SET_FRAME_LIMIT, /* Loads core. */ - 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, - EVENT_CMD_SAVE_STATE_DECREMENT, - EVENT_CMD_SAVE_STATE_INCREMENT, + CMD_EVENT_LOAD_CORE_DEINIT, + CMD_EVENT_LOAD_CORE, + CMD_EVENT_LOAD_CORE_PERSIST, + CMD_EVENT_UNLOAD_CORE, + CMD_EVENT_LOAD_STATE, + CMD_EVENT_SAVE_STATE, + CMD_EVENT_SAVE_STATE_DECREMENT, + CMD_EVENT_SAVE_STATE_INCREMENT, /* Takes screenshot. */ - EVENT_CMD_TAKE_SCREENSHOT, + CMD_EVENT_TAKE_SCREENSHOT, /* Quits RetroArch. */ - EVENT_CMD_QUIT, + CMD_EVENT_QUIT, /* Reinitialize all drivers. */ - EVENT_CMD_REINIT, + CMD_EVENT_REINIT, /* Toggles cheevos hardcore mode. */ - EVENT_CMD_CHEEVOS_HARDCORE_MODE_TOGGLE, + CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE, /* Deinitialize rewind. */ - EVENT_CMD_REWIND_DEINIT, + CMD_EVENT_REWIND_DEINIT, /* Initializes rewind. */ - EVENT_CMD_REWIND_INIT, + CMD_EVENT_REWIND_INIT, /* Toggles rewind. */ - EVENT_CMD_REWIND_TOGGLE, + CMD_EVENT_REWIND_TOGGLE, /* Deinitializes autosave. */ - EVENT_CMD_AUTOSAVE_DEINIT, + CMD_EVENT_AUTOSAVE_DEINIT, /* Initializes autosave. */ - EVENT_CMD_AUTOSAVE_INIT, - EVENT_CMD_AUTOSAVE_STATE, + CMD_EVENT_AUTOSAVE_INIT, + CMD_EVENT_AUTOSAVE_STATE, /* Stops audio. */ - EVENT_CMD_AUDIO_STOP, + CMD_EVENT_AUDIO_STOP, /* Starts audio. */ - EVENT_CMD_AUDIO_START, + CMD_EVENT_AUDIO_START, /* Mutes audio. */ - EVENT_CMD_AUDIO_MUTE_TOGGLE, + CMD_EVENT_AUDIO_MUTE_TOGGLE, /* Initializes overlay. */ - EVENT_CMD_OVERLAY_INIT, + CMD_EVENT_OVERLAY_INIT, /* Deinitializes overlay. */ - EVENT_CMD_OVERLAY_DEINIT, + CMD_EVENT_OVERLAY_DEINIT, /* Sets current scale factor for overlay. */ - EVENT_CMD_OVERLAY_SET_SCALE_FACTOR, + CMD_EVENT_OVERLAY_SET_SCALE_FACTOR, /* Sets current alpha modulation for overlay. */ - EVENT_CMD_OVERLAY_SET_ALPHA_MOD, + CMD_EVENT_OVERLAY_SET_ALPHA_MOD, /* Cycle to next overlay. */ - EVENT_CMD_OVERLAY_NEXT, + CMD_EVENT_OVERLAY_NEXT, /* Deinitializes overlay. */ - EVENT_CMD_DSP_FILTER_INIT, + CMD_EVENT_DSP_FILTER_INIT, /* Deinitializes graphics filter. */ - EVENT_CMD_DSP_FILTER_DEINIT, + CMD_EVENT_DSP_FILTER_DEINIT, /* Deinitializes GPU recoring. */ - EVENT_CMD_GPU_RECORD_DEINIT, + CMD_EVENT_GPU_RECORD_DEINIT, /* Initializes recording system. */ - EVENT_CMD_RECORD_INIT, + CMD_EVENT_RECORD_INIT, /* Deinitializes recording system. */ - EVENT_CMD_RECORD_DEINIT, + CMD_EVENT_RECORD_DEINIT, /* Deinitializes history playlist. */ - EVENT_CMD_HISTORY_DEINIT, + CMD_EVENT_HISTORY_DEINIT, /* Initializes history playlist. */ - EVENT_CMD_HISTORY_INIT, + CMD_EVENT_HISTORY_INIT, /* Deinitializes core information. */ - EVENT_CMD_CORE_INFO_DEINIT, + CMD_EVENT_CORE_INFO_DEINIT, /* Initializes core information. */ - EVENT_CMD_CORE_INFO_INIT, + CMD_EVENT_CORE_INFO_INIT, /* Deinitializes core. */ - EVENT_CMD_CORE_DEINIT, + CMD_EVENT_CORE_DEINIT, /* Initializes core. */ - EVENT_CMD_CORE_INIT, + CMD_EVENT_CORE_INIT, /* Set audio blocking state. */ - EVENT_CMD_AUDIO_SET_BLOCKING_STATE, + CMD_EVENT_AUDIO_SET_BLOCKING_STATE, /* Set audio nonblocking state. */ - EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE, + CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, /* Apply video state changes. */ - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES, + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES, /* Set video blocking state. */ - EVENT_CMD_VIDEO_SET_BLOCKING_STATE, + CMD_EVENT_VIDEO_SET_BLOCKING_STATE, /* Set video nonblocking state. */ - EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE, + CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, /* Sets current aspect ratio index. */ - EVENT_CMD_VIDEO_SET_ASPECT_RATIO, - EVENT_CMD_RESET_CONTEXT, + CMD_EVENT_VIDEO_SET_ASPECT_RATIO, + CMD_EVENT_RESET_CONTEXT, /* Restarts RetroArch. */ - EVENT_CMD_RESTART_RETROARCH, + CMD_EVENT_RESTART_RETROARCH, /* Force-quit RetroArch. */ - EVENT_CMD_QUIT_RETROARCH, + CMD_EVENT_QUIT_RETROARCH, /* Shutdown the OS */ - EVENT_CMD_SHUTDOWN, + CMD_EVENT_SHUTDOWN, /* Reboot the OS */ - EVENT_CMD_REBOOT, + CMD_EVENT_REBOOT, /* Resume RetroArch when in menu. */ - EVENT_CMD_RESUME, + CMD_EVENT_RESUME, /* Toggles pause. */ - EVENT_CMD_PAUSE_TOGGLE, + CMD_EVENT_PAUSE_TOGGLE, /* Pauses RetroArch. */ - EVENT_CMD_UNPAUSE, + CMD_EVENT_UNPAUSE, /* Unpauses retroArch. */ - EVENT_CMD_PAUSE, - EVENT_CMD_PAUSE_CHECKS, - EVENT_CMD_MENU_SAVE_CURRENT_CONFIG, - EVENT_CMD_MENU_SAVE_CONFIG, - EVENT_CMD_MENU_PAUSE_LIBRETRO, + CMD_EVENT_PAUSE, + CMD_EVENT_PAUSE_CHECKS, + CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, + CMD_EVENT_MENU_SAVE_CONFIG, + CMD_EVENT_MENU_PAUSE_LIBRETRO, /* Toggles menu on/off. */ - EVENT_CMD_MENU_TOGGLE, - EVENT_CMD_MENU_REFRESH, + CMD_EVENT_MENU_TOGGLE, + CMD_EVENT_MENU_REFRESH, /* Applies shader changes. */ - EVENT_CMD_SHADERS_APPLY_CHANGES, + CMD_EVENT_SHADERS_APPLY_CHANGES, /* Initializes shader directory. */ - EVENT_CMD_SHADER_DIR_INIT, + CMD_EVENT_SHADER_DIR_INIT, /* Deinitializes shader directory. */ - EVENT_CMD_SHADER_DIR_DEINIT, + CMD_EVENT_SHADER_DIR_DEINIT, /* Initializes controllers. */ - EVENT_CMD_CONTROLLERS_INIT, - EVENT_CMD_SAVEFILES, + CMD_EVENT_CONTROLLERS_INIT, + CMD_EVENT_SAVEFILES, /* Initializes savefiles. */ - EVENT_CMD_SAVEFILES_INIT, + CMD_EVENT_SAVEFILES_INIT, /* Deinitializes savefiles. */ - EVENT_CMD_SAVEFILES_DEINIT, + CMD_EVENT_SAVEFILES_DEINIT, /* Initializes cheats. */ - EVENT_CMD_CHEATS_INIT, + CMD_EVENT_CHEATS_INIT, /* Deinitializes cheats. */ - EVENT_CMD_CHEATS_DEINIT, + CMD_EVENT_CHEATS_DEINIT, /* Apply cheats. */ - EVENT_CMD_CHEATS_APPLY, + CMD_EVENT_CHEATS_APPLY, /* Deinitializes network system. */ - EVENT_CMD_NETWORK_DEINIT, + CMD_EVENT_NETWORK_DEINIT, /* Initializes network system. */ - EVENT_CMD_NETWORK_INIT, + CMD_EVENT_NETWORK_INIT, /* Initializes netplay system. */ - EVENT_CMD_NETPLAY_INIT, + CMD_EVENT_NETPLAY_INIT, /* Deinitializes netplay system. */ - EVENT_CMD_NETPLAY_DEINIT, + CMD_EVENT_NETPLAY_DEINIT, /* Flip netplay players. */ - EVENT_CMD_NETPLAY_FLIP_PLAYERS, + CMD_EVENT_NETPLAY_FLIP_PLAYERS, /* Initializes BSV movie. */ - EVENT_CMD_BSV_MOVIE_INIT, + CMD_EVENT_BSV_MOVIE_INIT, /* Deinitializes BSV movie. */ - EVENT_CMD_BSV_MOVIE_DEINIT, + CMD_EVENT_BSV_MOVIE_DEINIT, /* Initializes command interface. */ - EVENT_CMD_COMMAND_INIT, + CMD_EVENT_COMMAND_INIT, /* Deinitialize command interface. */ - EVENT_CMD_COMMAND_DEINIT, + CMD_EVENT_COMMAND_DEINIT, /* Initializes remote gamepad interface. */ - EVENT_CMD_REMOTE_INIT, + CMD_EVENT_REMOTE_INIT, /* Deinitializes remote gamepad interface. */ - EVENT_CMD_REMOTE_DEINIT, + CMD_EVENT_REMOTE_DEINIT, /* Reinitializes audio driver. */ - EVENT_CMD_AUDIO_REINIT, + CMD_EVENT_AUDIO_REINIT, /* Resizes windowed scale. Will reinitialize video driver. */ - EVENT_CMD_RESIZE_WINDOWED_SCALE, + CMD_EVENT_RESIZE_WINDOWED_SCALE, /* Deinitializes temporary content. */ - EVENT_CMD_TEMPORARY_CONTENT_DEINIT, - EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT, - EVENT_CMD_LOG_FILE_DEINIT, + CMD_EVENT_TEMPORARY_CONTENT_DEINIT, + CMD_EVENT_SUBSYSTEM_FULLPATHS_DEINIT, + CMD_EVENT_LOG_FILE_DEINIT, /* Toggles disk eject. */ - EVENT_CMD_DISK_EJECT_TOGGLE, + CMD_EVENT_DISK_EJECT_TOGGLE, /* Cycle to next disk. */ - EVENT_CMD_DISK_NEXT, + CMD_EVENT_DISK_NEXT, /* Cycle to previous disk. */ - EVENT_CMD_DISK_PREV, + CMD_EVENT_DISK_PREV, /* Appends disk image to disk image list. */ - EVENT_CMD_DISK_APPEND_IMAGE, + CMD_EVENT_DISK_APPEND_IMAGE, /* Stops rumbling. */ - EVENT_CMD_RUMBLE_STOP, + CMD_EVENT_RUMBLE_STOP, /* Toggles mouse grab. */ - EVENT_CMD_GRAB_MOUSE_TOGGLE, + CMD_EVENT_GRAB_MOUSE_TOGGLE, /* Toggles fullscreen mode. */ - EVENT_CMD_FULLSCREEN_TOGGLE, - EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG, - EVENT_CMD_VOLUME_UP, - EVENT_CMD_VOLUME_DOWN, - EVENT_CMD_EXEC + CMD_EVENT_FULLSCREEN_TOGGLE, + CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG, + CMD_EVENT_VOLUME_UP, + CMD_EVENT_VOLUME_DOWN, + CMD_EVENT_EXEC }; typedef struct command_handle @@ -239,7 +239,7 @@ bool command_free(command_t *handle); #endif /** - * event_command: + * command_event: * @cmd : Command index. * * Performs RetroArch command with index @cmd. diff --git a/content.c b/content.c index c41c3e4e2d..73c0f6ba94 100644 --- a/content.c +++ b/content.c @@ -901,9 +901,9 @@ bool content_load(content_ctx_info_t *info) #ifdef HAVE_MENU menu_driver_ctl(RARCH_MENU_CTL_SHADER_MANAGER_INIT, NULL); #endif - command_event(EVENT_CMD_HISTORY_INIT, NULL); - command_event(EVENT_CMD_RESUME, NULL); - command_event(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL); + command_event(CMD_EVENT_HISTORY_INIT, NULL); + command_event(CMD_EVENT_RESUME, NULL); + command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL); check_default_dirs(); diff --git a/driver.c b/driver.c index c5c4c05378..5e6c076363 100644 --- a/driver.c +++ b/driver.c @@ -207,7 +207,7 @@ static void driver_adjust_system_rates(void) return; if (runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL)) - command_event(EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE, NULL); + command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL); else driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); } @@ -254,7 +254,7 @@ static bool driver_update_system_av_info(const struct retro_system_av_info *info struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); memcpy(av_info, info, sizeof(*av_info)); - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); /* Cannot continue recording with different parameters. * Take the easiest route out and just restart the recording. */ @@ -263,8 +263,8 @@ static bool driver_update_system_av_info(const struct retro_system_av_info *info runloop_msg_queue_push( msg_hash_to_str(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT), 2, 180, false); - command_event(EVENT_CMD_RECORD_DEINIT, NULL); - command_event(EVENT_CMD_RECORD_INIT, NULL); + command_event(CMD_EVENT_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_RECORD_INIT, NULL); } return true; @@ -286,8 +286,8 @@ static void menu_update_libretro_info(void) if (!info) return; - command_event(EVENT_CMD_CORE_INFO_INIT, NULL); - command_event(EVENT_CMD_LOAD_CORE_PERSIST, NULL); + command_event(CMD_EVENT_CORE_INFO_INIT, NULL); + command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL); } #endif diff --git a/dynamic.c b/dynamic.c index 5a857cd33a..cf8afb23b4 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1245,7 +1245,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) /* Forces recomputation of aspect ratios if * using core-dependent aspect ratios. */ - command_event(EVENT_CMD_VIDEO_SET_ASPECT_RATIO, NULL); + command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL); /* TODO: Figure out what to do, if anything, with recording. */ } diff --git a/frontend/drivers/platform_ctr.c b/frontend/drivers/platform_ctr.c index b7cb60c86a..7551b1c124 100644 --- a/frontend/drivers/platform_ctr.c +++ b/frontend/drivers/platform_ctr.c @@ -95,7 +95,7 @@ static void frontend_ctr_deinit(void *data) *verbose = true; #ifdef HAVE_FILE_LOGGER - command_event(EVENT_CMD_LOG_FILE_DEINIT, NULL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); #endif if(gfxBottomFramebuffers[0] == (u8*)currentConsole->frameBuffer) diff --git a/frontend/drivers/platform_emscripten.c b/frontend/drivers/platform_emscripten.c index 4deee94655..dab55da49e 100644 --- a/frontend/drivers/platform_emscripten.c +++ b/frontend/drivers/platform_emscripten.c @@ -44,22 +44,22 @@ static void emscripten_mainloop(void) void cmd_savefiles(void) { - command_event(EVENT_CMD_SAVEFILES, NULL); + command_event(CMD_EVENT_SAVEFILES, NULL); } void cmd_save_state(void) { - command_event(EVENT_CMD_SAVE_STATE, NULL); + command_event(CMD_EVENT_SAVE_STATE, NULL); } void cmd_load_state(void) { - command_event(EVENT_CMD_LOAD_STATE, NULL); + command_event(CMD_EVENT_LOAD_STATE, NULL); } void cmd_take_screenshot(void) { - command_event(EVENT_CMD_TAKE_SCREENSHOT, NULL); + command_event(CMD_EVENT_TAKE_SCREENSHOT, NULL); } diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 97cbadfd7a..2b796f691d 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -163,7 +163,7 @@ static void frontend_psp_deinit(void *data) *verbose = false; #ifdef HAVE_FILE_LOGGER - command_event(EVENT_CMD_LOG_FILE_DEINIT, NULL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); #endif #endif diff --git a/frontend/frontend.c b/frontend/frontend.c index ac23b047a9..3708bb64d9 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -59,7 +59,7 @@ void main_exit(void *args) { settings_t *settings = config_get_ptr(); - command_event(EVENT_CMD_MENU_SAVE_CURRENT_CONFIG, NULL); + command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); #ifdef HAVE_MENU /* Do not want menu context to live any more. */ @@ -67,7 +67,7 @@ void main_exit(void *args) #endif rarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL); - command_event(EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG, NULL); + command_event(CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG, NULL); #if defined(HAVE_LOGGER) && !defined(ANDROID) logger_shutdown(); diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index c24358bfeb..e254216539 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -512,13 +512,13 @@ static bool ctr_frame(void* data, const void* frame, if(!aptMainLoop()) { - command_event(EVENT_CMD_QUIT, NULL); + command_event(CMD_EVENT_QUIT, NULL); return true; } if (select_pressed) { - command_event(EVENT_CMD_QUIT, NULL); + command_event(CMD_EVENT_QUIT, NULL); return true; } diff --git a/gfx/video_driver.c b/gfx/video_driver.c index cbfbecd223..673b0266c0 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -505,7 +505,7 @@ static void deinit_pixel_converter(void) static bool uninit_video_input(void) { - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); if (!video_driver_is_video_cache_context()) video_driver_deinit_hw_context(); @@ -526,7 +526,7 @@ static bool uninit_video_input(void) deinit_pixel_converter(); deinit_video_filter(); - command_event(EVENT_CMD_SHADER_DIR_DEINIT, NULL); + command_event(CMD_EVENT_SHADER_DIR_DEINIT, NULL); video_monitor_compute_fps_statistics(); return true; @@ -600,7 +600,7 @@ static bool init_video(void) runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); init_video_filter(video_driver_state.pix_fmt); - command_event(EVENT_CMD_SHADER_DIR_INIT, NULL); + command_event(CMD_EVENT_SHADER_DIR_INIT, NULL); if (av_info) geom = (const struct retro_game_geometry*)&av_info->geometry; @@ -742,8 +742,8 @@ static bool init_video(void) init_video_input(tmp); - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); - command_event(EVENT_CMD_OVERLAY_INIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_INIT, NULL); video_driver_cached_frame_set(&dummy_pixels, 4, 4, 8); @@ -1221,7 +1221,7 @@ void video_driver_menu_settings(void **list_data, void *list_info_data, menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); menu_settings_list_current_add_range( list, list_info, @@ -1250,7 +1250,7 @@ void video_driver_menu_settings(void **list_data, void *list_info_data, menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); #endif #ifdef _XBOX1 CONFIG_UINT( diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 312e9972d2..d27b7b3206 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1067,7 +1067,7 @@ static void android_input_poll(void *data) if (android_app->reinitRequested != 0) { if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); android_app_write_cmd(android_app, APP_CMD_REINIT_DONE); return; } @@ -1094,7 +1094,7 @@ bool android_run_events(void *data) if (android_app->reinitRequested != 0) { if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); android_app_write_cmd(android_app, APP_CMD_REINIT_DONE); } diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index dbe7e278b8..aaf4db24d0 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -170,7 +170,7 @@ static void ctr_joypad_poll(void) (state_tmp & KEY_SELECT) && (state_tmp & KEY_L) && (state_tmp & KEY_R)) - command_event(EVENT_CMD_QUIT, NULL); + command_event(CMD_EVENT_QUIT, NULL); } diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 9ae34ab732..5175e44217 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -369,7 +369,7 @@ static int core_setting_left(unsigned type, const char *label, static int disk_options_disk_idx_left(unsigned type, const char *label, bool wraparound) { - command_event(EVENT_CMD_DISK_PREV, NULL); + command_event(CMD_EVENT_DISK_PREV, NULL); return 0; } diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 44feb5477c..c129b1d76c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -506,7 +506,7 @@ static int file_load_with_detect_core_wrapper(size_t idx, size_t entry_idx, switch (ret) { case -1: - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); rarch_task_push_content_load_default(NULL, NULL, false, CORE_TYPE_PLAIN, NULL, NULL); @@ -695,7 +695,7 @@ static int action_ok_playlist_entry(const char *path, static int action_ok_cheat_apply_changes(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - command_event(EVENT_CMD_CHEATS_APPLY, NULL); + command_event(CMD_EVENT_CHEATS_APPLY, NULL); return 0; } @@ -758,7 +758,7 @@ static int generic_action_ok(const char *path, flush_char = NULL; flush_type = MENU_SETTINGS; runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, action_path); - if (command_event(EVENT_CMD_LOAD_CORE, NULL)) + if (command_event(CMD_EVENT_LOAD_CORE, NULL)) { #ifndef HAVE_DYNAMIC if (frontend_driver_set_fork(FRONTEND_FORK_CORE)) @@ -818,8 +818,8 @@ static int generic_action_ok(const char *path, case ACTION_OK_APPEND_DISK_IMAGE: flush_char = NULL; flush_type = 49; - command_event(EVENT_CMD_DISK_APPEND_IMAGE, action_path); - command_event(EVENT_CMD_RESUME, NULL); + command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path); + command_event(CMD_EVENT_RESUME, NULL); break; case ACTION_OK_SET_PATH: flush_char = NULL; @@ -1244,18 +1244,18 @@ static int generic_action_ok_command(enum event_command cmd) static int action_ok_load_state(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - if (generic_action_ok_command(EVENT_CMD_LOAD_STATE) == -1) + if (generic_action_ok_command(CMD_EVENT_LOAD_STATE) == -1) return menu_cbs_exit(); - return generic_action_ok_command(EVENT_CMD_RESUME); + return generic_action_ok_command(CMD_EVENT_RESUME); } static int action_ok_save_state(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - if (generic_action_ok_command(EVENT_CMD_SAVE_STATE) == -1) + if (generic_action_ok_command(CMD_EVENT_SAVE_STATE) == -1) return menu_cbs_exit(); - return generic_action_ok_command(EVENT_CMD_RESUME); + return generic_action_ok_command(CMD_EVENT_RESUME); } #ifdef HAVE_NETWORKING @@ -1269,10 +1269,10 @@ static void cb_decompressed(void *task_data, void *user_data, const char *err) switch (type_hash) { case CB_CORE_UPDATER_DOWNLOAD: - command_event(EVENT_CMD_CORE_INFO_INIT, NULL); + command_event(CMD_EVENT_CORE_INFO_INIT, NULL); break; case CB_UPDATE_ASSETS: - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); break; } } @@ -1414,7 +1414,7 @@ static void cb_generic_download(void *task_data, switch (transf->type_hash) { case CB_CORE_UPDATER_DOWNLOAD: - command_event(EVENT_CMD_CORE_INFO_INIT, NULL); + command_event(CMD_EVENT_CORE_INFO_INIT, NULL); break; } #endif @@ -1592,7 +1592,7 @@ static int action_ok_update_autoconfig_profiles_hid(const char *path, static int action_ok_disk_cycle_tray_status(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_DISK_EJECT_TOGGLE); + return generic_action_ok_command(CMD_EVENT_DISK_EJECT_TOGGLE); } /* creates folder and core options stub file for subsequent runs */ @@ -1637,43 +1637,43 @@ static int action_ok_option_create(const char *path, static int action_ok_close_content(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_UNLOAD_CORE); + return generic_action_ok_command(CMD_EVENT_UNLOAD_CORE); } static int action_ok_quit(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_QUIT); + return generic_action_ok_command(CMD_EVENT_QUIT); } static int action_ok_save_new_config(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_MENU_SAVE_CONFIG); + return generic_action_ok_command(CMD_EVENT_MENU_SAVE_CONFIG); } static int action_ok_resume_content(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_RESUME); + return generic_action_ok_command(CMD_EVENT_RESUME); } static int action_ok_restart_content(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_RESET); + return generic_action_ok_command(CMD_EVENT_RESET); } static int action_ok_screenshot(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_TAKE_SCREENSHOT); + return generic_action_ok_command(CMD_EVENT_TAKE_SCREENSHOT); } static int action_ok_shader_apply_changes(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return generic_action_ok_command(EVENT_CMD_SHADERS_APPLY_CHANGES); + return generic_action_ok_command(CMD_EVENT_SHADERS_APPLY_CHANGES); } static int action_ok_lookup_setting(const char *path, @@ -1708,7 +1708,7 @@ static int generic_action_ok_network(const char *path, if (string_is_empty(settings->network.buildbot_url)) return menu_cbs_exit(); - command_event(EVENT_CMD_NETWORK_INIT, NULL); + command_event(CMD_EVENT_NETWORK_INIT, NULL); switch (type_id) { @@ -2109,7 +2109,7 @@ static int action_ok_load_archive(const char *path, fill_pathname_join(detect_content_path, menu_path, content_path, sizeof(detect_content_path)); - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); rarch_task_push_content_load_default( NULL, detect_content_path, false, CORE_TYPE_PLAIN, NULL, NULL); @@ -2153,7 +2153,7 @@ static int action_ok_load_archive_detect_core(const char *path, switch (ret) { case -1: - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); rarch_task_push_content_load_default(NULL, NULL, false, CORE_TYPE_PLAIN, NULL, NULL); return 0; @@ -2228,7 +2228,7 @@ static int action_ok_video_resolution(const char *path, { char msg[PATH_MAX_LENGTH] = {0}; #ifdef __CELLOS_LV2__ - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); #endif video_driver_set_video_mode(width, height, true); #ifdef GEKKO diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index f760cdc3d1..2dbc0dd861 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -391,7 +391,7 @@ int core_setting_right(unsigned type, const char *label, static int disk_options_disk_idx_right(unsigned type, const char *label, bool wraparound) { - command_event(EVENT_CMD_DISK_NEXT, NULL); + command_event(CMD_EVENT_DISK_NEXT, NULL); return 0; } diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index e8f2b6ff59..e29750ad36 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -62,7 +62,7 @@ static int action_start_video_filter_file_load(unsigned type, const char *label) return -1; settings->path.softfilter_plugin[0] = '\0'; - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); return 0; } diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 88a946f272..27bc4f0b55 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -389,7 +389,7 @@ static bool nk_menu_init_list(void *data) menu_entries_add(menu_stack, info.path, info.label, info.type, info.flags, 0); - command_event(EVENT_CMD_HISTORY_INIT, NULL); + command_event(CMD_EVENT_HISTORY_INIT, NULL); info.list = selection_buf; diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 64b21b98e7..24ecf16868 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -1156,7 +1156,7 @@ static bool zarch_menu_init_list(void *data) menu_entries_add(menu_stack, info.path, info.label, info.type, info.flags, 0); - command_event(EVENT_CMD_HISTORY_INIT, NULL); + command_event(CMD_EVENT_HISTORY_INIT, NULL); info.list = selection_buf; diff --git a/menu/menu_content.c b/menu/menu_content.c index 37785abe9c..759da171de 100644 --- a/menu/menu_content.c +++ b/menu/menu_content.c @@ -195,10 +195,10 @@ static bool menu_content_load_from_playlist(void *data) else menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL); - if (!command_event(EVENT_CMD_EXEC, (void*)path)) + if (!command_event(CMD_EVENT_EXEC, (void*)path)) return false; - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); return true; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 5853b338c1..5adcc3c8b2 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3775,7 +3775,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) content_playlist_t *playlist = g_defaults.history; if (!playlist) - command_event(EVENT_CMD_HISTORY_INIT, NULL); + command_event(CMD_EVENT_HISTORY_INIT, NULL); strlcpy(path_playlist, "history", sizeof(path_playlist)); diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 3d3d89c9e0..a7ebcfac2a 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -115,7 +115,7 @@ static void bundle_decompressed(void *task_data, decompress_task_data_t *dec = (decompress_task_data_t*)task_data; if (dec && !err) - command_event(EVENT_CMD_REINIT, NULL); + command_event(CMD_EVENT_REINIT, NULL); if (err) RARCH_ERR("%s", err); @@ -159,7 +159,7 @@ static bool menu_init(menu_handle_t *menu_data) menu_data->push_help_screen = true; menu_data->help_screen_type = MENU_HELP_WELCOME; settings->menu_show_start_screen = false; - command_event(EVENT_CMD_MENU_SAVE_CURRENT_CONFIG, NULL); + command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); } if ( settings->bundle_assets_extract_enable @@ -245,12 +245,12 @@ static void menu_driver_toggle(bool latch) menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); /* Menu should always run with vsync on. */ - command_event(EVENT_CMD_VIDEO_SET_BLOCKING_STATE, NULL); + command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL); /* Stop all rumbling before entering the menu. */ - command_event(EVENT_CMD_RUMBLE_STOP, NULL); + command_event(CMD_EVENT_RUMBLE_STOP, NULL); if (settings->menu.pause_libretro) - command_event(EVENT_CMD_AUDIO_STOP, NULL); + command_event(CMD_EVENT_AUDIO_STOP, NULL); /* Override keyboard callback to redirect to menu instead. * We'll use this later for something ... */ @@ -269,7 +269,7 @@ static void menu_driver_toggle(bool latch) driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); if (settings && settings->menu.pause_libretro) - command_event(EVENT_CMD_AUDIO_START, NULL); + command_event(CMD_EVENT_AUDIO_START, NULL); /* Prevent stray input from going to libretro core */ input_driver_set_flushing_input(); @@ -565,7 +565,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) menu_display_deinit(); menu_entries_ctl(MENU_ENTRIES_CTL_DEINIT, NULL); - command_event(EVENT_CMD_HISTORY_DEINIT, NULL); + command_event(CMD_EVENT_HISTORY_DEINIT, NULL); core_info_deinit_list(); core_info_free_current_core(); @@ -860,7 +860,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) if (menu_driver_ctl(RARCH_MENU_CTL_IS_PENDING_SHUTDOWN, NULL)) { menu_driver_ctl(RARCH_MENU_CTL_UNSET_PENDING_SHUTDOWN, NULL); - if (!command_event(EVENT_CMD_QUIT, NULL)) + if (!command_event(CMD_EVENT_QUIT, NULL)) return false; return true; } diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 7b61ef6ce6..ea9d339edc 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1336,7 +1336,7 @@ static int setting_generic_action_ok_default(void *data, bool wraparound) (void)wraparound; - if (setting->cmd_trigger.idx != EVENT_CMD_NONE) + if (setting->cmd_trigger.idx != CMD_EVENT_NONE) setting->cmd_trigger.triggered = true; return 0; @@ -2690,7 +2690,7 @@ static int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound float video_refresh_rate_float = (float)video_refresh_rate; driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &video_refresh_rate_float); /* Incase refresh rate update forced non-block video. */ - command_event(EVENT_CMD_VIDEO_SET_BLOCKING_STATE, NULL); + command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL); } if (setting_generic_action_ok_default(setting, wraparound) != 0) @@ -2749,7 +2749,7 @@ static int setting_action_action_ok(void *data, bool wraparound) (void)wraparound; - if (setting->cmd_trigger.idx != EVENT_CMD_NONE) + if (setting->cmd_trigger.idx != CMD_EVENT_NONE) command_event(setting->cmd_trigger.idx, NULL); return 0; @@ -2878,7 +2878,7 @@ void general_read_handler(void *data) void general_write_handler(void *data) { - enum event_command rarch_cmd = EVENT_CMD_NONE; + enum event_command rarch_cmd = CMD_EVENT_NONE; menu_displaylist_info_t info = {0}; rarch_setting_t *setting = (rarch_setting_t*)data; settings_t *settings = config_get_ptr(); @@ -2893,7 +2893,7 @@ void general_write_handler(void *data) if (!setting) return; - if (setting->cmd_trigger.idx != EVENT_CMD_NONE) + if (setting->cmd_trigger.idx != CMD_EVENT_NONE) { if (flags & SD_FLAG_EXIT) { @@ -2972,13 +2972,13 @@ void general_write_handler(void *data) driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, setting->value.target.fraction); /* In case refresh rate update forced non-block video. */ - rarch_cmd = EVENT_CMD_VIDEO_SET_BLOCKING_STATE; + rarch_cmd = CMD_EVENT_VIDEO_SET_BLOCKING_STATE; break; case MENU_LABEL_VIDEO_SCALE: settings->video.scale = roundf(*setting->value.target.fraction); if (!settings->video.fullscreen) - rarch_cmd = EVENT_CMD_REINIT; + rarch_cmd = CMD_EVENT_REINIT; break; case MENU_LABEL_INPUT_PLAYER1_JOYPAD_INDEX: settings->input.joypad_map[0] = *setting->value.target.integer; @@ -3015,11 +3015,11 @@ void general_write_handler(void *data) audio_driver_set_volume_gain(db_to_gain(*setting->value.target.fraction)); break; case MENU_LABEL_AUDIO_LATENCY: - rarch_cmd = EVENT_CMD_AUDIO_REINIT; + rarch_cmd = CMD_EVENT_AUDIO_REINIT; break; case MENU_LABEL_PAL60_ENABLE: if (*setting->value.target.boolean && global->console.screen.pal_enable) - rarch_cmd = EVENT_CMD_REINIT; + rarch_cmd = CMD_EVENT_REINIT; else menu_setting_set_with_string_representation(setting, "false"); break; @@ -3116,14 +3116,14 @@ static void overlay_enable_toggle_change_handler(void *data) if (settings && settings->input.overlay_hide_in_menu) { - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); return; } if (setting->value.target.boolean) - command_event(EVENT_CMD_OVERLAY_INIT, NULL); + command_event(CMD_EVENT_OVERLAY_INIT, NULL); else - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); } #endif @@ -3522,7 +3522,7 @@ static bool setting_append_list( (*list)[list_info->index - 1].size = sizeof(settings->path.libretro); (*list)[list_info->index - 1].value.target.string = settings->path.libretro; (*list)[list_info->index - 1].values = ext_name; - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_LOAD_CORE); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_LOAD_CORE); settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION); } } @@ -3592,7 +3592,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_RESTART_RETROARCH); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_RESTART_RETROARCH); #endif CONFIG_ACTION( @@ -3610,7 +3610,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_SAVE_CURRENT_CONFIG); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG); CONFIG_ACTION( list, list_info, @@ -3619,7 +3619,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_SAVE_CONFIG); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CONFIG); CONFIG_ACTION( list, list_info, @@ -3638,7 +3638,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_QUIT_RETROARCH); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_QUIT_RETROARCH); #endif #if defined(HAVE_LAKKA) @@ -3649,7 +3649,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_SHUTDOWN); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_SHUTDOWN); CONFIG_ACTION( list, list_info, @@ -3658,7 +3658,7 @@ static bool setting_append_list( &group_info, &subgroup_info, parent_group); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REBOOT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REBOOT); #endif CONFIG_ACTION( @@ -4131,7 +4131,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_AUTOSAVE_INIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_AUTOSAVE_INIT); menu_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 = @@ -4204,7 +4204,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REWIND_TOGGLE); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REWIND_TOGGLE); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); #if 0 @@ -4292,7 +4292,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); menu_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; @@ -4313,7 +4313,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); } if (video_driver_has_windowed()) @@ -4380,7 +4380,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED); } @@ -4400,7 +4400,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_SET_ASPECT_RATIO); + CMD_EVENT_VIDEO_SET_ASPECT_RATIO); menu_settings_list_current_add_range( list, list_info, @@ -4428,7 +4428,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); CONFIG_INT( list, list_info, @@ -4445,7 +4445,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); CONFIG_UINT( list, list_info, @@ -4465,7 +4465,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); CONFIG_UINT( list, list_info, @@ -4485,7 +4485,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); END_SUB_GROUP(list, list_info, parent_group); START_SUB_GROUP(list, list_info, "Scaling", &group_info, &subgroup_info, parent_group); @@ -4523,7 +4523,7 @@ static bool setting_append_list( menu_settings_list_current_add_cmd( list, list_info, - EVENT_CMD_VIDEO_APPLY_STATE_CHANGES); + CMD_EVENT_VIDEO_APPLY_STATE_CHANGES); #ifdef GEKKO CONFIG_UINT( @@ -4608,7 +4608,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED); #endif @@ -4637,7 +4637,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_VIDEO_SET_BLOCKING_STATE); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_VIDEO_SET_BLOCKING_STATE); menu_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); @@ -4765,7 +4765,7 @@ static bool setting_append_list( general_write_handler, general_read_handler); menu_settings_list_current_add_values(list, list_info, "filt"); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY); END_SUB_GROUP(list, list_info, parent_group); @@ -4989,7 +4989,7 @@ static bool setting_append_list( general_write_handler, general_read_handler); menu_settings_list_current_add_values(list, list_info, "dsp"); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_DSP_FILTER_INIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_DSP_FILTER_INIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY); END_SUB_GROUP(list, list_info, parent_group); @@ -5408,7 +5408,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_SET_FRAME_LIMIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_SET_FRAME_LIMIT); menu_settings_list_current_add_range(list, list_info, 0, 10, 1.0, true, true); CONFIG_FLOAT( @@ -5611,7 +5611,7 @@ static bool setting_append_list( general_write_handler, general_read_handler); menu_settings_list_current_add_values(list, list_info, "cfg"); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_INIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_INIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY); CONFIG_FLOAT( @@ -5626,7 +5626,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_ALPHA_MOD); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_SET_ALPHA_MOD); menu_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); @@ -5642,7 +5642,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_SCALE_FACTOR); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_SET_SCALE_FACTOR); menu_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); @@ -5721,7 +5721,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_PAUSE_LIBRETRO); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_PAUSE_LIBRETRO); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); CONFIG_BOOL( @@ -6152,7 +6152,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT); settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); CONFIG_BOOL( @@ -6308,7 +6308,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CHEEVOS_HARDCORE_MODE_TOGGLE); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE); END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); @@ -6707,7 +6707,7 @@ static bool setting_append_list( true, true); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_REFRESH); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_REFRESH); (*list)[list_info->index - 1].get_string_representation = &setting_get_string_representation_uint_user_language; @@ -6928,7 +6928,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT); settings_data_list_current_add_flags( list, list_info, @@ -6947,7 +6947,7 @@ static bool setting_append_list( parent_group, general_write_handler, general_read_handler); - menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT); settings_data_list_current_add_flags( list, list_info, diff --git a/network/netplay.c b/network/netplay.c index 7b5a848a03..2a26c5b523 100644 --- a/network/netplay.c +++ b/network/netplay.c @@ -276,11 +276,11 @@ static bool netplay_get_cmd(netplay_t *netplay) return netplay_cmd_nak(netplay); case NETPLAY_CMD_PAUSE: - command_event(EVENT_CMD_PAUSE, NULL); + command_event(CMD_EVENT_PAUSE, NULL); return netplay_cmd_ack(netplay); case NETPLAY_CMD_RESUME: - command_event(EVENT_CMD_UNPAUSE, NULL); + command_event(CMD_EVENT_UNPAUSE, NULL); return netplay_cmd_ack(netplay); default: break; @@ -1163,7 +1163,7 @@ bool netplay_driver_ctl(enum rarch_netplay_ctl_state state, void *data) { bool *state = (bool*)data; if (*state) - command_event(EVENT_CMD_FULLSCREEN_TOGGLE, NULL); + command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); } break; default: diff --git a/record/record_driver.c b/record/record_driver.c index 83ac334275..d99b3fc51c 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -198,7 +198,7 @@ void recording_dump_frame(const void *data, unsigned width, { RARCH_WARN("%s \n", msg_hash_to_str(MSG_VIEWPORT_SIZE_CALCULATION_FAILED)); - command_event(EVENT_CMD_GPU_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_GPU_RECORD_DEINIT, NULL); recording_dump_frame(data, width, height, pitch); return; @@ -213,7 +213,7 @@ void recording_dump_frame(const void *data, unsigned width, runloop_msg_queue_push( msg_hash_to_str(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE), 1, 180, true); - command_event(EVENT_CMD_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_RECORD_DEINIT, NULL); return; } @@ -256,7 +256,7 @@ bool recording_deinit(void) recording_data = NULL; recording_driver = NULL; - command_event(EVENT_CMD_GPU_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_GPU_RECORD_DEINIT, NULL); return true; } @@ -425,7 +425,7 @@ bool recording_init(void) if (!record_driver_init_first(&recording_driver, &recording_data, ¶ms)) { RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_START_RECORDING)); - command_event(EVENT_CMD_GPU_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_GPU_RECORD_DEINIT, NULL); return false; } diff --git a/retroarch.c b/retroarch.c index 3ca465fa95..3cca26e356 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1069,7 +1069,7 @@ static void retroarch_init_savefile_paths(void) runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); - command_event(EVENT_CMD_SAVEFILES_DEINIT, NULL); + command_event(CMD_EVENT_SAVEFILES_DEINIT, NULL); global->savefiles = string_list_new(); retro_assert(global->savefiles); @@ -1299,25 +1299,25 @@ static int retroarch_main_init(int argc, char *argv[]) } driver_ctl(RARCH_DRIVER_CTL_INIT_PRE, NULL); - if (!command_event(EVENT_CMD_CORE_INIT, ¤t_core_type)) + if (!command_event(CMD_EVENT_CORE_INIT, ¤t_core_type)) goto error; driver_ctl(RARCH_DRIVER_CTL_INIT_ALL, NULL); - command_event(EVENT_CMD_COMMAND_INIT, NULL); - command_event(EVENT_CMD_REMOTE_INIT, NULL); - command_event(EVENT_CMD_REWIND_INIT, NULL); - command_event(EVENT_CMD_CONTROLLERS_INIT, NULL); - command_event(EVENT_CMD_RECORD_INIT, NULL); - command_event(EVENT_CMD_CHEATS_INIT, NULL); - command_event(EVENT_CMD_SAVEFILES_INIT, NULL); - command_event(EVENT_CMD_SET_PER_GAME_RESOLUTION, NULL); + command_event(CMD_EVENT_COMMAND_INIT, NULL); + command_event(CMD_EVENT_REMOTE_INIT, NULL); + command_event(CMD_EVENT_REWIND_INIT, NULL); + command_event(CMD_EVENT_CONTROLLERS_INIT, NULL); + command_event(CMD_EVENT_RECORD_INIT, NULL); + command_event(CMD_EVENT_CHEATS_INIT, NULL); + command_event(CMD_EVENT_SAVEFILES_INIT, NULL); + command_event(CMD_EVENT_SET_PER_GAME_RESOLUTION, NULL); rarch_ctl(RARCH_CTL_UNSET_ERROR_ON_INIT, NULL); rarch_ctl(RARCH_CTL_SET_INITED, NULL); return 0; error: - command_event(EVENT_CMD_CORE_DEINIT, NULL); + command_event(CMD_EVENT_CORE_DEINIT, NULL); rarch_ctl(RARCH_CTL_UNSET_INITED, NULL); return 1; } @@ -1382,7 +1382,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_DEINIT, NULL); driver_ctl(RARCH_DRIVER_CTL_UNINIT_ALL, NULL); - command_event(EVENT_CMD_LOG_FILE_DEINIT, NULL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); runloop_ctl(RUNLOOP_CTL_STATE_FREE, NULL); runloop_ctl(RUNLOOP_CTL_GLOBAL_FREE, NULL); @@ -1399,33 +1399,33 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) if (!config_realloc()) return false; - command_event(EVENT_CMD_HISTORY_DEINIT, NULL); + command_event(CMD_EVENT_HISTORY_DEINIT, NULL); runloop_ctl(RUNLOOP_CTL_CLEAR_STATE, NULL); break; case RARCH_CTL_MAIN_DEINIT: if (!rarch_ctl(RARCH_CTL_IS_INITED, NULL)) return false; - command_event(EVENT_CMD_NETPLAY_DEINIT, NULL); - command_event(EVENT_CMD_COMMAND_DEINIT, NULL); - command_event(EVENT_CMD_REMOTE_DEINIT, NULL); + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + command_event(CMD_EVENT_COMMAND_DEINIT, NULL); + command_event(CMD_EVENT_REMOTE_DEINIT, NULL); - command_event(EVENT_CMD_AUTOSAVE_DEINIT, NULL); + command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL); - command_event(EVENT_CMD_RECORD_DEINIT, NULL); - command_event(EVENT_CMD_SAVEFILES, NULL); + command_event(CMD_EVENT_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_SAVEFILES, NULL); - command_event(EVENT_CMD_REWIND_DEINIT, NULL); - command_event(EVENT_CMD_CHEATS_DEINIT, NULL); - command_event(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); + command_event(CMD_EVENT_REWIND_DEINIT, NULL); + command_event(CMD_EVENT_CHEATS_DEINIT, NULL); + command_event(CMD_EVENT_BSV_MOVIE_DEINIT, NULL); - command_event(EVENT_CMD_AUTOSAVE_STATE, NULL); + command_event(CMD_EVENT_AUTOSAVE_STATE, NULL); - command_event(EVENT_CMD_CORE_DEINIT, NULL); + command_event(CMD_EVENT_CORE_DEINIT, NULL); - command_event(EVENT_CMD_TEMPORARY_CONTENT_DEINIT, NULL); - command_event(EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT, NULL); - command_event(EVENT_CMD_SAVEFILES_DEINIT, NULL); + command_event(CMD_EVENT_TEMPORARY_CONTENT_DEINIT, NULL); + command_event(CMD_EVENT_SUBSYSTEM_FULLPATHS_DEINIT, NULL); + command_event(CMD_EVENT_SAVEFILES_DEINIT, NULL); rarch_ctl(RARCH_CTL_UNSET_INITED, NULL); break; @@ -1511,7 +1511,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) #endif #ifdef HAVE_OVERLAY if (settings->input.overlay_hide_in_menu) - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); #endif break; case RARCH_CTL_LOAD_CONTENT: @@ -1533,7 +1533,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) video_driver_set_texture_enable(false, false); #ifdef HAVE_OVERLAY if (settings && settings->input.overlay_hide_in_menu) - command_event(EVENT_CMD_OVERLAY_INIT, NULL); + command_event(CMD_EVENT_OVERLAY_INIT, NULL); #endif break; case RARCH_CTL_QUIT: diff --git a/runloop.c b/runloop.c index 0653374ba0..97be8b4e5d 100644 --- a/runloop.c +++ b/runloop.c @@ -186,7 +186,7 @@ static bool runloop_check_movie_playback(void) msg_hash_to_str(MSG_MOVIE_PLAYBACK_ENDED), 1, 180, false); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_PLAYBACK_ENDED)); - command_event(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); + command_event(CMD_EVENT_BSV_MOVIE_DEINIT, NULL); bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_END, NULL); bsv_movie_ctl(BSV_MOVIE_CTL_UNSET_PLAYBACK, NULL); @@ -204,7 +204,7 @@ static bool runloop_check_movie_record(void) msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED), 2, 180, true); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED)); - command_event(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); + command_event(CMD_EVENT_BSV_MOVIE_DEINIT, NULL); return true; } @@ -279,22 +279,22 @@ static bool check_pause(settings_t *settings, bool frameadvance_pressed) { static bool old_focus = true; - enum event_command cmd = EVENT_CMD_NONE; + enum event_command cmd = CMD_EVENT_NONE; bool old_is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); /* FRAMEADVANCE will set us into pause mode. */ pause_pressed |= !old_is_paused && frameadvance_pressed; if (focus && pause_pressed) - cmd = EVENT_CMD_PAUSE_TOGGLE; + cmd = CMD_EVENT_PAUSE_TOGGLE; else if (focus && !old_focus) - cmd = EVENT_CMD_UNPAUSE; + cmd = CMD_EVENT_UNPAUSE; else if (!focus && old_focus) - cmd = EVENT_CMD_PAUSE; + cmd = CMD_EVENT_PAUSE; old_focus = focus; - if (cmd != EVENT_CMD_NONE) + if (cmd != CMD_EVENT_NONE) command_event(cmd, NULL); if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) == old_is_paused) @@ -394,7 +394,7 @@ static bool shader_dir_init(rarch_dir_list_t *dir_list) if (!dir_list->list || dir_list->list->size == 0) { - command_event(EVENT_CMD_SHADER_DIR_DEINIT, NULL); + command_event(CMD_EVENT_SHADER_DIR_DEINIT, NULL); return false; } @@ -517,10 +517,10 @@ static bool runloop_check_state(event_cmd_state_t *cmd, rarch_dir_list_t *shader return false; if (runloop_cmd_triggered(cmd, RARCH_SCREENSHOT)) - command_event(EVENT_CMD_TAKE_SCREENSHOT, NULL); + command_event(CMD_EVENT_TAKE_SCREENSHOT, NULL); if (runloop_cmd_triggered(cmd, RARCH_MUTE)) - command_event(EVENT_CMD_AUDIO_MUTE_TOGGLE, NULL); + command_event(CMD_EVENT_AUDIO_MUTE_TOGGLE, NULL); if (runloop_cmd_triggered(cmd, RARCH_OSK)) { @@ -534,9 +534,9 @@ static bool runloop_check_state(event_cmd_state_t *cmd, rarch_dir_list_t *shader } if (runloop_cmd_press(cmd, RARCH_VOLUME_UP)) - command_event(EVENT_CMD_VOLUME_UP, NULL); + command_event(CMD_EVENT_VOLUME_UP, NULL); else if (runloop_cmd_press(cmd, RARCH_VOLUME_DOWN)) - command_event(EVENT_CMD_VOLUME_DOWN, NULL); + command_event(CMD_EVENT_VOLUME_DOWN, NULL); #ifdef HAVE_NETPLAY tmp = runloop_cmd_triggered(cmd, RARCH_NETPLAY_FLIP); @@ -557,9 +557,9 @@ static bool runloop_check_state(event_cmd_state_t *cmd, rarch_dir_list_t *shader ); if (runloop_cmd_triggered(cmd, RARCH_SAVE_STATE_KEY)) - command_event(EVENT_CMD_SAVE_STATE, NULL); + command_event(CMD_EVENT_SAVE_STATE, NULL); else if (runloop_cmd_triggered(cmd, RARCH_LOAD_STATE_KEY)) - command_event(EVENT_CMD_LOAD_STATE, NULL); + command_event(CMD_EVENT_LOAD_STATE, NULL); #ifdef HAVE_CHEEVOS if(!settings->cheevos.hardcore_mode_enable) @@ -578,14 +578,14 @@ static bool runloop_check_state(event_cmd_state_t *cmd, rarch_dir_list_t *shader runloop_cmd_triggered(cmd, RARCH_SHADER_PREV)); if (runloop_cmd_triggered(cmd, RARCH_DISK_EJECT_TOGGLE)) - command_event(EVENT_CMD_DISK_EJECT_TOGGLE, NULL); + command_event(CMD_EVENT_DISK_EJECT_TOGGLE, NULL); else if (runloop_cmd_triggered(cmd, RARCH_DISK_NEXT)) - command_event(EVENT_CMD_DISK_NEXT, NULL); + command_event(CMD_EVENT_DISK_NEXT, NULL); else if (runloop_cmd_triggered(cmd, RARCH_DISK_PREV)) - command_event(EVENT_CMD_DISK_PREV, NULL); + command_event(CMD_EVENT_DISK_PREV, NULL); if (runloop_cmd_triggered(cmd, RARCH_RESET)) - command_event(EVENT_CMD_RESET, NULL); + command_event(CMD_EVENT_RESET, NULL); cheat_manager_state_checks( runloop_cmd_triggered(cmd, RARCH_CHEAT_INDEX_PLUS), @@ -611,7 +611,7 @@ static bool runloop_check_pause_state(event_cmd_state_t *cmd) if (runloop_cmd_triggered(cmd, RARCH_FULLSCREEN_TOGGLE_KEY)) { - command_event(EVENT_CMD_FULLSCREEN_TOGGLE, NULL); + command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); video_driver_cached_frame_render(); } @@ -909,10 +909,10 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) case RUNLOOP_CTL_GLOBAL_FREE: { global_t *global = NULL; - command_event(EVENT_CMD_TEMPORARY_CONTENT_DEINIT, NULL); - command_event(EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT, NULL); - command_event(EVENT_CMD_RECORD_DEINIT, NULL); - command_event(EVENT_CMD_LOG_FILE_DEINIT, NULL); + command_event(CMD_EVENT_TEMPORARY_CONTENT_DEINIT, NULL); + command_event(CMD_EVENT_SUBSYSTEM_FULLPATHS_DEINIT, NULL); + command_event(CMD_EVENT_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL); @@ -1212,19 +1212,19 @@ static void runloop_iterate_linefeed_overlay(settings_t *settings) { input_driver_unset_onscreen_keyboard_enabled(); prev_overlay_restore = true; - command_event(EVENT_CMD_OVERLAY_DEINIT, NULL); + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); } else if (!osk_enable && input_keyboard_ctl( RARCH_INPUT_KEYBOARD_CTL_IS_LINEFEED_ENABLED, NULL)) { input_driver_set_onscreen_keyboard_enabled(); prev_overlay_restore = false; - command_event(EVENT_CMD_OVERLAY_INIT, NULL); + command_event(CMD_EVENT_OVERLAY_INIT, NULL); } else if (prev_overlay_restore) { if (!settings->input.overlay_hide_in_menu) - command_event(EVENT_CMD_OVERLAY_INIT, NULL); + command_event(CMD_EVENT_OVERLAY_INIT, NULL); prev_overlay_restore = false; } } @@ -1366,7 +1366,7 @@ int runloop_iterate(unsigned *sleep_ms) cmd.state[2] = cmd.state[0] & ~cmd.state[1]; /* trigger */ if (runloop_cmd_triggered(cmd_ptr, RARCH_OVERLAY_NEXT)) - command_event(EVENT_CMD_OVERLAY_NEXT, NULL); + command_event(CMD_EVENT_OVERLAY_NEXT, NULL); if (runloop_cmd_triggered(cmd_ptr, RARCH_FULLSCREEN_TOGGLE_KEY)) { @@ -1377,11 +1377,11 @@ int runloop_iterate(unsigned *sleep_ms) #endif if (fullscreen_toggled) - command_event(EVENT_CMD_FULLSCREEN_TOGGLE, NULL); + command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); } if (runloop_cmd_triggered(cmd_ptr, RARCH_GRAB_MOUSE_TOGGLE)) - command_event(EVENT_CMD_GRAB_MOUSE_TOGGLE, NULL); + command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL); #ifdef HAVE_MENU if (runloop_cmd_menu_press(cmd_ptr) || diff --git a/tasks/task_content.c b/tasks/task_content.c index 6bf6045a96..0d73d769aa 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -30,12 +30,12 @@ bool rarch_task_push_content_load_default( bool persist, enum rarch_core_type type, retro_task_callback_t cb, void *user_data) { - enum event_command cmd = EVENT_CMD_NONE; + enum event_command cmd = CMD_EVENT_NONE; if (core_path) { runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)core_path); - command_event(EVENT_CMD_LOAD_CORE, NULL); + command_event(CMD_EVENT_LOAD_CORE, NULL); } if (fullpath) @@ -45,21 +45,21 @@ bool rarch_task_push_content_load_default( { case CORE_TYPE_PLAIN: case CORE_TYPE_DUMMY: - cmd = persist ? EVENT_CMD_LOAD_CONTENT_PERSIST : EVENT_CMD_LOAD_CONTENT; + cmd = persist ? CMD_EVENT_LOAD_CONTENT_PERSIST : CMD_EVENT_LOAD_CONTENT; break; case CORE_TYPE_FFMPEG: #ifdef HAVE_FFMPEG - cmd = EVENT_CMD_LOAD_CONTENT_FFMPEG; + cmd = CMD_EVENT_LOAD_CONTENT_FFMPEG; #endif break; case CORE_TYPE_IMAGEVIEWER: #ifdef HAVE_IMAGEVIEWER - cmd = EVENT_CMD_LOAD_CONTENT_IMAGEVIEWER; + cmd = CMD_EVENT_LOAD_CONTENT_IMAGEVIEWER; #endif break; } - if (cmd != EVENT_CMD_NONE) + if (cmd != CMD_EVENT_NONE) command_event(cmd, NULL); #ifdef HAVE_MENU diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index c6479608d8..e186dcb785 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -258,7 +258,7 @@ static void poll_iteration(void) if (rarch_ctl(RARCH_CTL_IS_INITED, NULL)) reply = NSTerminateCancel; - ui_companion_event_command(EVENT_CMD_QUIT); + ui_companion_event_command(CMD_EVENT_QUIT); return reply; } @@ -280,7 +280,7 @@ static void poll_iteration(void) runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)__core.UTF8String); if (core_name) - ui_companion_event_command(EVENT_CMD_LOAD_CONTENT); + ui_companion_event_command(CMD_EVENT_LOAD_CONTENT); [sender replyToOpenOrPrint:NSApplicationDelegateReplySuccess]; } @@ -306,7 +306,7 @@ static void open_core_handler(NSOpenPanel *panel, NSInteger result) return; runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)__core.UTF8String); - ui_companion_event_command(EVENT_CMD_LOAD_CORE); + ui_companion_event_command(CMD_EVENT_LOAD_CORE); if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL) && settings->set_supports_no_game_enable) @@ -343,7 +343,7 @@ static void open_document_handler(NSOpenPanel *panel, NSInteger result) runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, (void*)__core.UTF8String); if (core_name) - ui_companion_event_command(EVENT_CMD_LOAD_CONTENT); + ui_companion_event_command(CMD_EVENT_LOAD_CONTENT); } break; case 0: /* NSCancelButton/NSModalResponseCancel */ @@ -443,37 +443,37 @@ static void open_document_handler(NSOpenPanel *panel, NSInteger result) switch (sender_tag) { case 1: - cmd = EVENT_CMD_RESET; + cmd = CMD_EVENT_RESET; break; case 2: - cmd = EVENT_CMD_LOAD_STATE; + cmd = CMD_EVENT_LOAD_STATE; break; case 3: - cmd = EVENT_CMD_SAVE_STATE; + cmd = CMD_EVENT_SAVE_STATE; break; case 4: - cmd = EVENT_CMD_DISK_EJECT_TOGGLE; + cmd = CMD_EVENT_DISK_EJECT_TOGGLE; break; case 5: - cmd = EVENT_CMD_DISK_PREV; + cmd = CMD_EVENT_DISK_PREV; break; case 6: - cmd = EVENT_CMD_DISK_NEXT; + cmd = CMD_EVENT_DISK_NEXT; break; case 7: - cmd = EVENT_CMD_GRAB_MOUSE_TOGGLE; + cmd = CMD_EVENT_GRAB_MOUSE_TOGGLE; break; case 8: - cmd = EVENT_CMD_MENU_TOGGLE; + cmd = CMD_EVENT_MENU_TOGGLE; break; case 9: - cmd = EVENT_CMD_PAUSE_TOGGLE; + cmd = CMD_EVENT_PAUSE_TOGGLE; break; case 20: - cmd = EVENT_CMD_FULLSCREEN_TOGGLE; + cmd = CMD_EVENT_FULLSCREEN_TOGGLE; break; default: - cmd = EVENT_CMD_NONE; + cmd = CMD_EVENT_NONE; break; } @@ -481,7 +481,7 @@ static void open_document_handler(NSOpenPanel *panel, NSInteger result) { unsigned idx = (sender_tag - (10-1)); runloop_ctl(RUNLOOP_CTL_SET_WINDOWED_SCALE, &idx); - cmd = EVENT_CMD_RESIZE_WINDOWED_SCALE; + cmd = CMD_EVENT_RESIZE_WINDOWED_SCALE; } ui_companion_event_command(cmd); diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 59e24c9922..586dada58a 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -91,7 +91,7 @@ static void rarch_draw_observer(CFRunLoopObserverRef observer, if (ret == -1) { - ui_companion_cocoatouch_event_command(NULL, EVENT_CMD_MENU_SAVE_CURRENT_CONFIG); + ui_companion_cocoatouch_event_command(NULL, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG); main_exit(NULL); return; } @@ -408,7 +408,7 @@ enum #endif dispatch_async(dispatch_get_main_queue(), ^{ - ui_companion_cocoatouch_event_command(NULL, EVENT_CMD_MENU_SAVE_CURRENT_CONFIG); + ui_companion_cocoatouch_event_command(NULL, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG); }); [self showPauseMenu: self]; } @@ -444,14 +444,14 @@ enum [[UIApplication sharedApplication] setIdleTimerDisabled:true]; [self.window setRootViewController:[CocoaView get]]; - ui_companion_cocoatouch_event_command(NULL, EVENT_CMD_AUDIO_START); + ui_companion_cocoatouch_event_command(NULL, CMD_EVENT_AUDIO_START); rarch_disable_ui(); } - (IBAction)showPauseMenu:(id)sender { #ifndef HAVE_AVFOUNDATION - ui_companion_cocoatouch_event_command(NULL, EVENT_CMD_AUDIO_STOP); + ui_companion_cocoatouch_event_command(NULL, CMD_EVENT_AUDIO_STOP); #endif rarch_enable_ui(); diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 8d06d1ec53..0983e130b1 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -524,7 +524,7 @@ bool win32_browser( LRESULT win32_menu_loop(HWND owner, WPARAM wparam) { WPARAM mode = wparam & 0xffff; - enum event_command cmd = EVENT_CMD_NONE; + enum event_command cmd = CMD_EVENT_NONE; bool do_wm_close = false; settings_t *settings = config_get_ptr(); @@ -568,11 +568,11 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) { case ID_M_LOAD_CORE: runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, win32_file); - cmd = EVENT_CMD_LOAD_CORE; + cmd = CMD_EVENT_LOAD_CORE; break; case ID_M_LOAD_CONTENT: runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, win32_file); - cmd = EVENT_CMD_LOAD_CONTENT; + cmd = CMD_EVENT_LOAD_CONTENT; do_wm_close = true; break; } @@ -580,34 +580,34 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) } break; case ID_M_RESET: - cmd = EVENT_CMD_RESET; + cmd = CMD_EVENT_RESET; break; case ID_M_MUTE_TOGGLE: - cmd = EVENT_CMD_AUDIO_MUTE_TOGGLE; + cmd = CMD_EVENT_AUDIO_MUTE_TOGGLE; break; case ID_M_MENU_TOGGLE: - cmd = EVENT_CMD_MENU_TOGGLE; + cmd = CMD_EVENT_MENU_TOGGLE; break; case ID_M_PAUSE_TOGGLE: - cmd = EVENT_CMD_PAUSE_TOGGLE; + cmd = CMD_EVENT_PAUSE_TOGGLE; break; case ID_M_LOAD_STATE: - cmd = EVENT_CMD_LOAD_STATE; + cmd = CMD_EVENT_LOAD_STATE; break; case ID_M_SAVE_STATE: - cmd = EVENT_CMD_SAVE_STATE; + cmd = CMD_EVENT_SAVE_STATE; break; case ID_M_DISK_CYCLE: - cmd = EVENT_CMD_DISK_EJECT_TOGGLE; + cmd = CMD_EVENT_DISK_EJECT_TOGGLE; break; case ID_M_DISK_NEXT: - cmd = EVENT_CMD_DISK_NEXT; + cmd = CMD_EVENT_DISK_NEXT; break; case ID_M_DISK_PREV: - cmd = EVENT_CMD_DISK_PREV; + cmd = CMD_EVENT_DISK_PREV; break; case ID_M_FULL_SCREEN: - cmd = EVENT_CMD_FULLSCREEN_TOGGLE; + cmd = CMD_EVENT_FULLSCREEN_TOGGLE; break; #ifndef _XBOX case ID_M_SHADER_PARAMETERS: @@ -615,10 +615,10 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) break; #endif case ID_M_MOUSE_GRAB: - cmd = EVENT_CMD_GRAB_MOUSE_TOGGLE; + cmd = CMD_EVENT_GRAB_MOUSE_TOGGLE; break; case ID_M_TAKE_SCREENSHOT: - cmd = EVENT_CMD_TAKE_SCREENSHOT; + cmd = CMD_EVENT_TAKE_SCREENSHOT; break; case ID_M_QUIT: do_wm_close = true; @@ -628,7 +628,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) { unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1)); runloop_ctl(RUNLOOP_CTL_SET_WINDOWED_SCALE, &idx); - cmd = EVENT_CMD_RESIZE_WINDOWED_SCALE; + cmd = CMD_EVENT_RESIZE_WINDOWED_SCALE; } else if (mode == ID_M_STATE_INDEX_AUTO) { @@ -644,7 +644,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) break; } - if (cmd != EVENT_CMD_NONE) + if (cmd != CMD_EVENT_NONE) command_event(cmd, NULL); if (do_wm_close)