diff --git a/command_event.c b/command_event.c index b1cb20cd35..a96b7664d2 100644 --- a/command_event.c +++ b/command_event.c @@ -677,7 +677,7 @@ static bool event_save_core_config(void) sizeof(config_dir)); else { - runloop_msg_queue_push_new(MSG_CONFIG_DIRECTORY_NOT_SET, 1, 180, true); + runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true); RARCH_ERR("%s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET)); return false; } @@ -1047,7 +1047,7 @@ bool event_cmd_ctl(enum event_command cmd, void *data) break; case EVENT_CMD_RESET: RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET)); - runloop_msg_queue_push_new(MSG_RESET, 1, 120, true); + runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true); #ifdef HAVE_CHEEVOS cheevos_set_cheats(); @@ -1571,8 +1571,8 @@ bool event_cmd_ctl(enum event_command cmd, void *data) } } else - runloop_msg_queue_push_new( - MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, + runloop_msg_queue_push( + msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; case EVENT_CMD_DISK_NEXT: @@ -1591,8 +1591,8 @@ bool event_cmd_ctl(enum event_command cmd, void *data) event_check_disk_next(control); } else - runloop_msg_queue_push_new( - MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, + runloop_msg_queue_push( + msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; case EVENT_CMD_DISK_PREV: @@ -1611,8 +1611,8 @@ bool event_cmd_ctl(enum event_command cmd, void *data) event_check_disk_prev(control); } else - runloop_msg_queue_push_new( - MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, + runloop_msg_queue_push( + msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS), 1, 120, true); break; case EVENT_CMD_RUMBLE_STOP: diff --git a/driver.c b/driver.c index b3c6d51d4e..af78e25f52 100644 --- a/driver.c +++ b/driver.c @@ -267,8 +267,9 @@ static bool driver_update_system_av_info(const struct retro_system_av_info *info * Take the easiest route out and just restart the recording. */ if (recording_driver_get_data_ptr()) { - runloop_msg_queue_push_new( - MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT, 2, 180, false); + runloop_msg_queue_push( + msg_hash_to_str(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT), + 2, 180, false); event_cmd_ctl(EVENT_CMD_RECORD_DEINIT, NULL); event_cmd_ctl(EVENT_CMD_RECORD_INIT, NULL); } diff --git a/movie.c b/movie.c index 43eb6b0f78..b034b29f3e 100644 --- a/movie.c +++ b/movie.c @@ -327,7 +327,7 @@ static void bsv_movie_init_state(void) } bsv_movie_state.movie_playback = true; - runloop_msg_queue_push_new(MSG_STARTING_MOVIE_PLAYBACK, 2, 180, false); + runloop_msg_queue_push(msg_hash_to_str(MSG_STARTING_MOVIE_PLAYBACK), 2, 180, false); RARCH_LOG("%s.\n", msg_hash_to_str(MSG_STARTING_MOVIE_PLAYBACK)); settings->rewind_granularity = 1; } @@ -342,7 +342,7 @@ static void bsv_movie_init_state(void) if (!(bsv_movie_init_handle(bsv_movie_state.movie_start_path, RARCH_MOVIE_RECORD))) { - runloop_msg_queue_push_new(MSG_FAILED_TO_START_MOVIE_RECORD, 1, 180, true); + runloop_msg_queue_push(msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD), 1, 180, true); RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD)); return; } diff --git a/netplay/netplay.c b/netplay/netplay.c index f334529931..d3eaecfde6 100644 --- a/netplay/netplay.c +++ b/netplay/netplay.c @@ -1140,8 +1140,8 @@ bool init_netplay(void) global->netplay.is_client = false; RARCH_WARN("%s\n", msg_hash_to_str(MSG_NETPLAY_FAILED)); - runloop_msg_queue_push_new( - MSG_NETPLAY_FAILED, + runloop_msg_queue_push( + msg_hash_to_str(MSG_NETPLAY_FAILED), 0, 180, false); return false; } diff --git a/record/record_driver.c b/record/record_driver.c index 65f263818e..8fbee8321d 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -202,7 +202,9 @@ void recording_dump_frame(const void *data, unsigned width, { RARCH_WARN("%s\n", msg_hash_to_str(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE)); - runloop_msg_queue_push_new(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE, 1, 180, true); + runloop_msg_queue_push( + msg_hash_to_str(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE), + 1, 180, true); event_cmd_ctl(EVENT_CMD_RECORD_DEINIT, NULL); return; } diff --git a/rewind.c b/rewind.c index 9e3f70cc9c..2b5b4fab96 100644 --- a/rewind.c +++ b/rewind.c @@ -719,7 +719,8 @@ void state_manager_check_rewind(bool pressed) state_manager_set_frame_is_reversed(true); audio_driver_ctl(RARCH_AUDIO_CTL_SETUP_REWIND, NULL); - runloop_msg_queue_push_new(MSG_REWINDING, 0, + runloop_msg_queue_push( + msg_hash_to_str(MSG_REWINDING), 0, runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) ? 1 : 30, true); @@ -732,7 +733,8 @@ void state_manager_check_rewind(bool pressed) bsv_movie_ctl(BSV_MOVIE_CTL_FRAME_REWIND, NULL); } else - runloop_msg_queue_push_new(MSG_REWIND_REACHED_END, + runloop_msg_queue_push( + msg_hash_to_str(MSG_REWIND_REACHED_END), 0, 30, true); } else diff --git a/runloop.c b/runloop.c index bedcff4d84..290067fa1a 100644 --- a/runloop.c +++ b/runloop.c @@ -114,18 +114,6 @@ const char *runloop_msg_queue_pull(void) return ret; } -void runloop_msg_queue_push_new(uint32_t hash, - unsigned prio, unsigned duration, - bool flush) -{ - const char *msg = msg_hash_to_str(hash); - - if (!msg) - return; - - runloop_msg_queue_push(msg, prio, duration, flush); -} - void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush) @@ -801,9 +789,9 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) video_driver_ctl(RARCH_DISPLAY_CTL_CACHED_FRAME_RENDER, NULL); if (state_manager_frame_is_reversed()) - runloop_msg_queue_push_new(MSG_SLOW_MOTION_REWIND, 0, 30, true); + runloop_msg_queue_push(msg_hash_to_str(MSG_SLOW_MOTION_REWIND), 0, 30, true); else - runloop_msg_queue_push_new(MSG_SLOW_MOTION, 0, 30, true); + runloop_msg_queue_push(msg_hash_to_str(MSG_SLOW_MOTION), 0, 30, true); } break; case RUNLOOP_CTL_CHECK_MOVIE: @@ -816,8 +804,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) if (!bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) return false; - runloop_msg_queue_push_new( - MSG_MOVIE_RECORD_STOPPED, 2, 180, true); + runloop_msg_queue_push( + msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED), 2, 180, true); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED)); event_cmd_ctl(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); @@ -856,8 +844,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) } else { - runloop_msg_queue_push_new( - MSG_FAILED_TO_START_MOVIE_RECORD, + runloop_msg_queue_push( + msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD), 1, 180, true); RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD)); @@ -868,8 +856,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) if (!bsv_movie_ctl(BSV_MOVIE_CTL_END, NULL)) return false; - runloop_msg_queue_push_new( - MSG_MOVIE_PLAYBACK_ENDED, 1, 180, false); + runloop_msg_queue_push( + msg_hash_to_str(MSG_MOVIE_PLAYBACK_ENDED), 1, 180, false); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_PLAYBACK_ENDED)); event_cmd_ctl(EVENT_CMD_BSV_MOVIE_DEINIT, NULL); diff --git a/runloop.h b/runloop.h index b3231e6d1b..dcbe40c1f2 100644 --- a/runloop.h +++ b/runloop.h @@ -299,9 +299,6 @@ int runloop_iterate(unsigned *sleep_ms); void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); -void runloop_msg_queue_push_new(uint32_t hash, unsigned prio, - unsigned duration, bool flush); - const char *runloop_msg_queue_pull(void); bool runloop_ctl(enum runloop_ctl_state state, void *data); diff --git a/tasks/task_database.c b/tasks/task_database.c index 17554acd27..fd7f1511ab 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -534,7 +534,9 @@ static void rarch_dbscan_task_handler(rarch_task_t *task) } else { - runloop_msg_queue_push_new(MSG_SCANNING_OF_DIRECTORY_FINISHED, 0, 180, true); + runloop_msg_queue_push( + msg_hash_to_str(MSG_SCANNING_OF_DIRECTORY_FINISHED), + 0, 180, true); goto task_finished; } break;