diff --git a/camera/camera_driver.c b/camera/camera_driver.c index f06be9afc2..9fbde34a9b 100644 --- a/camera/camera_driver.c +++ b/camera/camera_driver.c @@ -130,7 +130,7 @@ bool driver_camera_start(void) if (settings->camera.allow) return camera_driver->start(camera_data); - rarch_main_msg_queue_push( + runloop_msg_queue_push( "Camera is explicitly disabled.\n", 1, 180, false); } return false; diff --git a/cheats.c b/cheats.c index 3ffccd1e68..acbe4766a8 100644 --- a/cheats.c +++ b/cheats.c @@ -309,7 +309,7 @@ void cheat_manager_free(void) void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx) { - char msg[256] = {0}; + char msg[256]; if (!handle) return; @@ -319,7 +319,7 @@ void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx) (handle->cheats[handle_idx].desc) ? (handle->cheats[handle_idx].desc) : (handle->cheats[handle_idx].code) ); - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s\n", msg); } diff --git a/cheevos.c b/cheevos.c index 4f09980689..b61cc2e950 100644 --- a/cheevos.c +++ b/cheevos.c @@ -1207,8 +1207,8 @@ static int cheevos_login(retro_time_t *timeout) if (!username || !*username || !password || !*password) { - rarch_main_msg_queue_push("Missing Retro Achievements account information", 0, 5 * 60, false); - rarch_main_msg_queue_push("Please fill in your account information in Settings", 0, 5 * 60, false); + runloop_msg_queue_push("Missing Retro Achievements account information", 0, 5 * 60, false); + runloop_msg_queue_push("Please fill in your account information in Settings", 0, 5 * 60, false); RARCH_LOG("CHEEVOS username and/or password not informed\n"); return -1; } @@ -1236,8 +1236,8 @@ static int cheevos_login(retro_time_t *timeout) } } - rarch_main_msg_queue_push("Retro Achievements login error", 0, 5 * 60, false); - rarch_main_msg_queue_push("Please make sure your account information is correct", 0, 5 * 60, false); + runloop_msg_queue_push("Retro Achievements login error", 0, 5 * 60, false); + runloop_msg_queue_push("Please make sure your account information is correct", 0, 5 * 60, false); RARCH_LOG("CHEEVOS error getting user token\n"); return -1; } @@ -1285,8 +1285,8 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set) RARCH_LOG("CHEEVOS %s\n", cheevo->title); RARCH_LOG("CHEEVOS %s\n", cheevo->description); - rarch_main_msg_queue_push(cheevo->title, 0, 3 * 60, false); - rarch_main_msg_queue_push(cheevo->description, 0, 5 * 60, false); + runloop_msg_queue_push(cheevo->title, 0, 3 * 60, false); + runloop_msg_queue_push(cheevo->description, 0, 5 * 60, false); rarch_main_async_job_add(cheevos_unlocker, (void*)(uintptr_t)cheevo->id); @@ -1851,7 +1851,7 @@ int cheevos_load(const void *data) if (!memory) { - rarch_main_msg_queue_push("This core doesn't support achievements", 0, 5 * 60, false); + runloop_msg_queue_push("This core doesn't support achievements", 0, 5 * 60, false); RARCH_LOG("This core doesn't support achievements\n"); return -1; } @@ -1915,7 +1915,7 @@ int cheevos_load(const void *data) } } - rarch_main_msg_queue_push("This game doesn't feature achievements", 0, 5 * 60, false); + runloop_msg_queue_push("This game doesn't feature achievements", 0, 5 * 60, false); return -1; found: @@ -1935,7 +1935,7 @@ int cheevos_load(const void *data) free((void*)json); } - rarch_main_msg_queue_push("Error loading achievements", 0, 5 * 60, false); + runloop_msg_queue_push("Error loading achievements", 0, 5 * 60, false); return -1; } diff --git a/command.c b/command.c index f8e6bad4be..e853282043 100644 --- a/command.c +++ b/command.c @@ -242,7 +242,7 @@ static bool cmd_set_shader(const char *arg) } snprintf(msg, sizeof(msg), "Shader: \"%s\"", arg); - rarch_main_msg_queue_push(msg, 1, 120, true); + runloop_msg_queue_push(msg, 1, 120, true); RARCH_LOG("%s \"%s\".\n", msg_hash_to_str(MSG_APPLYING_SHADER), arg); diff --git a/command_event.c b/command_event.c index c8c5a2b3cc..88aae5419c 100644 --- a/command_event.c +++ b/command_event.c @@ -128,7 +128,7 @@ static void event_disk_control_set_eject(bool new_state, bool print_log) /* Only noise in menu. */ if (print_log) - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); } } @@ -195,7 +195,7 @@ static void event_disk_control_set_index(unsigned idx) RARCH_ERR("%s\n", msg); else RARCH_LOG("%s\n", msg); - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); } } @@ -233,7 +233,7 @@ void event_disk_control_append_image(const char *path) snprintf(msg, sizeof(msg), "%s: ", msg_hash_to_str(MSG_APPENDED_DISK)); strlcat(msg, path, sizeof(msg)); RARCH_LOG("%s\n", msg); - rarch_main_msg_queue_push(msg, 0, 180, true); + runloop_msg_queue_push(msg, 0, 180, true); event_command(EVENT_CMD_AUTOSAVE_DEINIT); @@ -340,7 +340,7 @@ static void event_set_volume(float gain) settings->audio.volume = min(settings->audio.volume, 12.0f); snprintf(msg, sizeof(msg), "Volume: %.1f dB", settings->audio.volume); - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s\n", msg); audio_driver_set_volume_gain(db_to_gain(settings->audio.volume)); @@ -490,7 +490,7 @@ static void event_load_auto_state(void) snprintf(msg, sizeof(msg), "Auto-loading savestate from \"%s\" %s.", savestate_name_auto, ret ? "succeeded" : "failed"); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); RARCH_LOG("%s\n", msg); } @@ -686,7 +686,7 @@ static bool event_save_core_config(void) sizeof(config_dir)); else { - rarch_main_msg_queue_push_new(MSG_CONFIG_DIRECTORY_NOT_SET, 1, 180, true); + runloop_msg_queue_push_new(MSG_CONFIG_DIRECTORY_NOT_SET, 1, 180, true); RARCH_ERR("%s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET)); return false; } @@ -755,7 +755,7 @@ static bool event_save_core_config(void) RARCH_ERR("%s\n", msg); } - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); global->overrides_active = overrides_active; return ret; } @@ -874,7 +874,7 @@ static void event_main_state(unsigned cmd) else strlcpy(msg, msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES), sizeof(msg)); - rarch_main_msg_queue_push(msg, 2, 180, true); + runloop_msg_queue_push(msg, 2, 180, true); RARCH_LOG("%s\n", msg); } @@ -937,7 +937,7 @@ bool event_command(enum event_command cmd) video_driver_set_video_mode(width, height, true); snprintf(msg, sizeof(msg),"Resolution: %dx%d",width, height); - rarch_main_msg_queue_push(msg, 1, 100, true); + runloop_msg_queue_push(msg, 1, 100, true); } } #endif @@ -1037,7 +1037,7 @@ bool event_command(enum event_command cmd) break; case EVENT_CMD_RESET: RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET)); - rarch_main_msg_queue_push_new(MSG_RESET, 1, 120, true); + runloop_msg_queue_push_new(MSG_RESET, 1, 120, true); #ifdef HAVE_CHEEVOS cheevos_set_cheats(); @@ -1177,7 +1177,7 @@ bool event_command(enum event_command cmd) return false; } - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s\n", msg); } break; @@ -1310,7 +1310,7 @@ bool event_command(enum event_command cmd) break; case EVENT_CMD_SHUTDOWN: #if defined(__linux__) && !defined(ANDROID) - rarch_main_msg_queue_push("Shutting down...", 1, 180, true); + runloop_msg_queue_push("Shutting down...", 1, 180, true); rarch_ctl(RARCH_CTL_FORCE_QUIT, NULL); system("shutdown -P now"); #endif @@ -1505,7 +1505,7 @@ bool event_command(enum event_command cmd) event_check_disk_eject(control); } else - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, 1, 120, true); break; @@ -1525,7 +1525,7 @@ bool event_command(enum event_command cmd) event_check_disk_next(control); } else - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, 1, 120, true); break; @@ -1545,7 +1545,7 @@ bool event_command(enum event_command cmd) event_check_disk_prev(control); } else - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS, 1, 120, true); break; diff --git a/configuration.c b/configuration.c index 36d5c85af0..fb921a6cae 100644 --- a/configuration.c +++ b/configuration.c @@ -2045,7 +2045,7 @@ bool config_load_override(void) /* Restore the libretro_path we're using * since it will be overwritten by the override when reloading. */ strlcpy(settings->libretro,buf,sizeof(settings->libretro)); - rarch_main_msg_queue_push("Configuration override loaded", 1, 100, true); + runloop_msg_queue_push("Configuration override loaded", 1, 100, true); /* Reset save paths */ global->has_set.save_path = true; @@ -2157,7 +2157,7 @@ bool config_load_remap(void) RARCH_LOG("Remaps: game-specific remap found at %s\n", game_path); if (input_remapping_load_file(new_conf, game_path)) { - rarch_main_msg_queue_push("Game remap file loaded", 1, 100, true); + runloop_msg_queue_push("Game remap file loaded", 1, 100, true); return true; } } @@ -2177,7 +2177,7 @@ bool config_load_remap(void) RARCH_LOG("Remaps: core-specific remap found at %s\n", core_path); if (input_remapping_load_file(new_conf, core_path)) { - rarch_main_msg_queue_push("Core remap file loaded", 1, 100, true); + runloop_msg_queue_push("Core remap file loaded", 1, 100, true); return true; } } diff --git a/driver.c b/driver.c index ab8321f169..ee1cd85091 100644 --- a/driver.c +++ b/driver.c @@ -311,7 +311,7 @@ bool driver_update_system_av_info(const void *data) * Take the easiest route out and just restart the recording. */ if (recording_driver_get_data_ptr()) { - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT, 2, 180, false); event_command(EVENT_CMD_RECORD_DEINIT); event_command(EVENT_CMD_RECORD_INIT); diff --git a/dynamic.c b/dynamic.c index ee9d31a6eb..9fb39e7066 100644 --- a/dynamic.c +++ b/dynamic.c @@ -658,7 +658,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) { const struct retro_message *msg = (const struct retro_message*)data; RARCH_LOG("Environ SET_MESSAGE: %s\n", msg->msg); - rarch_main_msg_queue_push(msg->msg, 1, msg->frames, true); + runloop_msg_queue_push(msg->msg, 1, msg->frames, true); break; } diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 6768b9cd82..209db3b93c 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -543,7 +543,7 @@ void x11_update_window_title(void *data) buf_fps, sizeof(buf_fps))) XStoreName(g_x11_dpy, g_x11_win, buf); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } bool x11_input_ctx_new(bool true_full) diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 18740568c0..386d4b74ef 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -1305,7 +1305,7 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, char buffer_fps[128] = {0}; video_monitor_get_fps(buffer, sizeof(buffer), settings->fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); - rarch_main_msg_queue_push(buffer_fps, 1, 1, false); + runloop_msg_queue_push(buffer_fps, 1, 1, false); } /* If at this point the dimension parameters are still zero, setup some * diff --git a/gfx/drivers_context/androidegl_ctx.c b/gfx/drivers_context/androidegl_ctx.c index 83c0cd5f1d..37283d9870 100644 --- a/gfx/drivers_context/androidegl_ctx.c +++ b/gfx/drivers_context/androidegl_ctx.c @@ -132,7 +132,7 @@ static void android_gfx_ctx_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool android_gfx_ctx_set_video_mode(void *data, diff --git a/gfx/drivers_context/bbqnx_ctx.c b/gfx/drivers_context/bbqnx_ctx.c index b14eb4995b..c3855eceb9 100644 --- a/gfx/drivers_context/bbqnx_ctx.c +++ b/gfx/drivers_context/bbqnx_ctx.c @@ -265,7 +265,7 @@ static void gfx_ctx_qnx_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_qnx_set_video_mode(void *data, diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 84d770d4ab..56715d1c97 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -122,7 +122,7 @@ static void gfx_ctx_cgl_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index e0a6b88f3e..3f203a5768 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -375,7 +375,7 @@ static void cocoagl_gfx_ctx_update_window_title(void *data) [[g_view window] setTitle:[NSString stringWithCString:text encoding:NSUTF8StringEncoding]]; #endif if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 126c50fe2f..0bb9646510 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -104,7 +104,7 @@ static void gfx_ctx_d3d_update_title(void *data) stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); strlcat(buffer_fps, mem, sizeof(buffer_fps)); #endif - rarch_main_msg_queue_push(buffer_fps, 1, 1, false); + runloop_msg_queue_push(buffer_fps, 1, 1, false); } } diff --git a/gfx/drivers_context/drm_egl_ctx.c b/gfx/drivers_context/drm_egl_ctx.c index 3fe86ce38d..67e5b90463 100644 --- a/gfx/drivers_context/drm_egl_ctx.c +++ b/gfx/drivers_context/drm_egl_ctx.c @@ -244,7 +244,7 @@ static void gfx_ctx_drm_egl_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push( buf_fps, 1, 1, false); + runloop_msg_queue_push( buf_fps, 1, 1, false); } static void gfx_ctx_drm_egl_get_video_size(void *data, diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index a8a44f6de0..0518fff611 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -88,7 +88,7 @@ static void gfx_ctx_emscripten_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_emscripten_get_video_size(void *data, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 19d07148d8..2ae81a368b 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -134,7 +134,7 @@ static void gfx_ctx_mali_fbdev_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index cfc43090c9..58625f4c5e 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -201,7 +201,7 @@ static void gfx_ctx_ps3_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_ps3_get_video_size(void *data, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 489c1ac6ab..0b653feda9 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -284,7 +284,7 @@ static void sdl_ctx_update_window_title(void *data) #endif } if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index e660796f93..5aefc075e1 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -91,7 +91,7 @@ static void gfx_ctx_vc_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_vc_get_video_size(void *data, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index a303ec48ae..b8d979d2ed 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -105,7 +105,7 @@ static void gfx_ctx_vivante_update_window_title(void *data) video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_vivante_set_video_mode(void *data, diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 9ac28cb57b..e20cda877c 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -241,7 +241,7 @@ static void gfx_ctx_wl_update_window_title(void *data) wl_shell_surface_set_title(wl->g_shell_surf, buf); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_wl_get_video_size(void *data, diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 9c738bfe0d..6bbb8c8f89 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -268,7 +268,7 @@ static void gfx_ctx_wgl_update_window_title(void *data) buf_fps, sizeof(buf_fps))) SetWindowText(window, buf); if (settings->fps_show) - rarch_main_msg_queue_push(buf_fps, 1, 1, false); + runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_wgl_get_video_size(void *data, unsigned *width, unsigned *height) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 63bb58a279..624d8f063e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -930,7 +930,7 @@ void video_monitor_set_refresh_rate(float hz) settings_t *settings = config_get_ptr(); snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); RARCH_LOG("%s\n", msg); settings->video.refresh_rate = hz; @@ -1854,7 +1854,7 @@ void video_driver_frame(const void *data, unsigned width, unsigned output_width = 0; unsigned output_height = 0; unsigned output_pitch = 0; - const char *msg = rarch_main_msg_queue_pull(); + const char *msg = runloop_msg_queue_pull(); settings_t *settings = config_get_ptr(); if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_ACTIVE, NULL)) diff --git a/input/drivers_joypad/linuxraw_joypad.c b/input/drivers_joypad/linuxraw_joypad.c index e4bc7a6f17..9ee35b3bd3 100644 --- a/input/drivers_joypad/linuxraw_joypad.c +++ b/input/drivers_joypad/linuxraw_joypad.c @@ -98,7 +98,7 @@ static bool linuxraw_joypad_init_pad(const char *path, struct linuxraw_joypad *p char msg[512] = {0}; snprintf(msg, sizeof(msg), "Device #%u (%s) connected.", (unsigned)(pad - linuxraw_pads), pad->ident); - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); } } else diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index 468265e471..53e876d5d2 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -344,7 +344,7 @@ static void udev_check_device(struct udev_device *dev, const char *path, bool ho char msg[256]; snprintf(msg, sizeof(msg), "Device #%u (%s) connected.", pad, path); - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); RARCH_LOG("[udev]: %s\n", msg); } break; diff --git a/input/input_autodetect.c b/input/input_autodetect.c index 26ac94fb6a..890357ac39 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -155,7 +155,7 @@ static void input_autoconfigure_joypad_add(config_file_t *conf, autoconfig_param params->name); if(!remote_is_bound) - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); remote_is_bound = true; } else @@ -167,7 +167,7 @@ static void input_autoconfigure_joypad_add(config_file_t *conf, autoconfig_param snprintf(msg, sizeof(msg), "%s configured in port #%u.", params->name, params->idx); if (!block_osd_spam) - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); } input_reindex_devices(); #if 0 @@ -330,7 +330,7 @@ bool input_config_autoconfigure_joypad(autoconfig_params_t *params) RARCH_LOG("Autodetect: no profiles found for %s (%d/%d)", params->name, params->vid, params->pid); snprintf(msg, sizeof(msg), "%s (%ld/%ld) not configured", params->name, (long)params->vid, (long)params->pid); - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); } return ret; } @@ -350,9 +350,9 @@ const struct retro_keybind *input_get_auto_bind(unsigned port, unsigned id) void input_config_autoconfigure_disconnect(unsigned i, const char *ident) { - char msg[PATH_MAX_LENGTH] = {0}; + char msg[PATH_MAX_LENGTH]; snprintf(msg, sizeof(msg), "Device #%u (%s) disconnected.", i, ident); - rarch_main_msg_queue_push(msg, 0, 60, false); + runloop_msg_queue_push(msg, 0, 60, false); RARCH_LOG("Autodetect: %s\n", msg); } diff --git a/location/location_driver.c b/location/location_driver.c index a09190b501..0ae87370c6 100644 --- a/location/location_driver.c +++ b/location/location_driver.c @@ -125,7 +125,7 @@ bool driver_location_start(void) if (settings->location.allow) return location_driver->start(location_data); - rarch_main_msg_queue_push("Location is explicitly disabled.\n", 1, 180, true); + runloop_msg_queue_push("Location is explicitly disabled.\n", 1, 180, true); } return false; } diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index 0abea74126..22aea94a71 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -434,13 +434,13 @@ static void rmenu_xui_frame(void) XuiRenderSetViewTransform( app.GetDC(), &matOrigView ); - message = rarch_main_msg_queue_pull(); + message = runloop_msg_queue_pull(); if (message) xui_render_message(message); else { - message = rarch_main_msg_queue_pull(); + message = runloop_msg_queue_pull(); if (message) xui_render_message(message); } diff --git a/menu/menu_display.c b/menu/menu_display.c index ff5a96daac..fbfe6e7218 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -528,7 +528,7 @@ void menu_display_timedate(char *s, size_t len, unsigned time_mode) void menu_display_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush) { - rarch_main_msg_queue_push(msg, prio, duration, flush); + runloop_msg_queue_push(msg, prio, duration, flush); } diff --git a/movie.c b/movie.c index dd726aac25..1c4c7f14b0 100644 --- a/movie.c +++ b/movie.c @@ -293,7 +293,7 @@ static void bsv_movie_init_state(void) } bsv_movie_state.movie_playback = true; - rarch_main_msg_queue_push_new(MSG_STARTING_MOVIE_PLAYBACK, 2, 180, false); + runloop_msg_queue_push_new(MSG_STARTING_MOVIE_PLAYBACK, 2, 180, false); RARCH_LOG("%s.\n", msg_hash_to_str(MSG_STARTING_MOVIE_PLAYBACK)); settings->rewind_granularity = 1; } @@ -308,12 +308,12 @@ static void bsv_movie_init_state(void) if (!(bsv_movie_init_handle(bsv_movie_state.movie_start_path, RARCH_MOVIE_RECORD))) { - rarch_main_msg_queue_push_new(MSG_FAILED_TO_START_MOVIE_RECORD, 1, 180, true); + runloop_msg_queue_push_new(MSG_FAILED_TO_START_MOVIE_RECORD, 1, 180, true); RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD)); return; } - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s \"%s\".\n", msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO), bsv_movie_state.movie_start_path); diff --git a/netplay.c b/netplay.c index 8d5a7dce55..8cddc6dfb8 100644 --- a/netplay.c +++ b/netplay.c @@ -149,7 +149,7 @@ static void *netplay_data; static void warn_hangup(void) { RARCH_WARN("Netplay has disconnected. Will continue without connection ...\n"); - rarch_main_msg_queue_push("Netplay has disconnected. Will continue without connection.", 0, 480, false); + runloop_msg_queue_push("Netplay has disconnected. Will continue without connection.", 0, 480, false); } /** @@ -338,7 +338,7 @@ static bool netplay_get_cmd(netplay_t *netplay) netplay->flip_frame = flip_frame; RARCH_LOG("Netplay users are flipped.\n"); - rarch_main_msg_queue_push("Netplay users are flipped.", 1, 180, false); + runloop_msg_queue_push("Netplay users are flipped.", 1, 180, false); return netplay_cmd_ack(netplay); @@ -686,7 +686,7 @@ static void log_connection(const struct sockaddr_storage *their_addr, snprintf(msg, sizeof(msg), "Got connection from: \"%s (%s)\" (#%u)", nick, str, slot); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); RARCH_LOG("%s\n", msg); } } @@ -995,7 +995,7 @@ static bool send_info(netplay_t *netplay) snprintf(msg, sizeof(msg), "Connected to: \"%s\"", netplay->other_nick); RARCH_LOG("%s\n", msg); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); return true; } @@ -1148,7 +1148,7 @@ static bool get_info_spectate(netplay_t *netplay) } snprintf(msg, sizeof(msg), "Connected to \"%s\"", netplay->other_nick); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); RARCH_LOG("%s\n", msg); @@ -1361,7 +1361,7 @@ bool netplay_command(netplay_t* netplay, enum netplay_cmd cmd, if(netplay_send_raw_cmd(netplay, cmd, data, sz)) { if(netplay_get_response(netplay)) - rarch_main_msg_queue_push(success_msg, 1, 180, false); + runloop_msg_queue_push(success_msg, 1, 180, false); else { msg = "Failed to send command \"%s\""; @@ -1373,7 +1373,7 @@ bool netplay_command(netplay_t* netplay, enum netplay_cmd cmd, error: snprintf(m, sizeof(m), msg, command_str); RARCH_WARN("%s\n", m); - rarch_main_msg_queue_push(m, 1, 180, false); + runloop_msg_queue_push(m, 1, 180, false); return false; } @@ -1483,7 +1483,7 @@ static int16_t netplay_get_spectate_input(netplay_t *netplay, bool port, return swap_if_big16(inp); RARCH_ERR("Connection with host was cut.\n"); - rarch_main_msg_queue_push("Connection with host was cut.", 1, 180, true); + runloop_msg_queue_push("Connection with host was cut.", 1, 180, true); core.retro_set_input_state(netplay->cbs.state_cb); return netplay->cbs.state_cb(port, device, idx, id); @@ -1700,7 +1700,7 @@ static void netplay_post_frame_spectate(netplay_t *netplay) RARCH_LOG("Client (#%u) disconnected ...\n", i); snprintf(msg, sizeof(msg), "Client (#%u) disconnected.", i); - rarch_main_msg_queue_push(msg, 1, 180, false); + runloop_msg_queue_push(msg, 1, 180, false); socket_close(netplay->spectate.fds[i]); netplay->spectate.fds[i] = -1; @@ -1783,7 +1783,7 @@ bool init_netplay(void) global->netplay.is_client = false; RARCH_WARN("%s\n", msg_hash_to_str(MSG_NETPLAY_FAILED)); - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_NETPLAY_FAILED_MOVIE_PLAYBACK_HAS_STARTED, 0, 180, false); return false; diff --git a/record/record_driver.c b/record/record_driver.c index d88ae79b43..2fc71c32cf 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -200,7 +200,7 @@ void recording_dump_frame(const void *data, unsigned width, { RARCH_WARN("%s\n", msg_hash_to_str(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE)); - rarch_main_msg_queue_push_new(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE, 1, 180, true); + runloop_msg_queue_push_new(MSG_RECORDING_TERMINATED_DUE_TO_RESIZE, 1, 180, true); event_command(EVENT_CMD_RECORD_DEINIT); return; } diff --git a/retroarch.c b/retroarch.c index fc4080a8dc..d00cf01b8f 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1557,7 +1557,7 @@ void rarch_playlist_load_content(void *data, unsigned idx) fp = retro_fopen(path_check, RFILE_MODE_READ, -1); if (!fp) { - rarch_main_msg_queue_push("File could not be loaded.\n", 1, 100, true); + runloop_msg_queue_push("File could not be loaded.\n", 1, 100, true); RARCH_LOG("File at %s failed to load.\n", path_check); free(path_tolower); free(path_check); diff --git a/rewind.c b/rewind.c index 1caa569185..f3b95f7648 100644 --- a/rewind.c +++ b/rewind.c @@ -682,7 +682,7 @@ void state_manager_check_rewind(bool pressed) state_manager_set_frame_is_reversed(true); audio_driver_ctl(RARCH_AUDIO_CTL_SETUP_REWIND, NULL); - rarch_main_msg_queue_push_new(MSG_REWINDING, 0, + runloop_msg_queue_push_new(MSG_REWINDING, 0, runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) ? 1 : 30, true); core.retro_unserialize(buf, rewind_state.size); @@ -690,7 +690,7 @@ void state_manager_check_rewind(bool pressed) bsv_movie_ctl(BSV_MOVIE_CTL_FRAME_REWIND, NULL); } else - rarch_main_msg_queue_push_new(MSG_REWIND_REACHED_END, + runloop_msg_queue_push_new(MSG_REWIND_REACHED_END, 0, 30, true); } else diff --git a/runloop.c b/runloop.c index f31e29a525..1472a5fae5 100644 --- a/runloop.c +++ b/runloop.c @@ -98,7 +98,7 @@ rarch_system_info_t *rarch_system_info_get_ptr(void) return &g_system; } -const char *rarch_main_msg_queue_pull(void) +const char *runloop_msg_queue_pull(void) { const char *ret = NULL; @@ -111,7 +111,7 @@ const char *rarch_main_msg_queue_pull(void) return ret; } -void rarch_main_msg_queue_push_new(uint32_t hash, unsigned prio, unsigned duration, +void runloop_msg_queue_push_new(uint32_t hash, unsigned prio, unsigned duration, bool flush) { const char *msg = msg_hash_to_str(hash); @@ -119,10 +119,10 @@ void rarch_main_msg_queue_push_new(uint32_t hash, unsigned prio, unsigned durati if (!msg) return; - rarch_main_msg_queue_push(msg, prio, duration, flush); + runloop_msg_queue_push(msg, prio, duration, flush); } -void rarch_main_msg_queue_push(const char *msg, unsigned prio, unsigned duration, +void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush) { settings_t *settings = config_get_ptr(); @@ -292,7 +292,7 @@ static void check_stateslots(settings_t *settings, msg_hash_to_str(MSG_STATE_SLOT), settings->state_slot); - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s\n", msg); } @@ -393,7 +393,7 @@ static void check_shader_dir(bool pressed_next, bool pressed_prev) snprintf(msg, sizeof(msg), "%s #%u: \"%s\".", msg_hash_to_str(MSG_SHADER), (unsigned)runloop_shader_dir.ptr, shader); - rarch_main_msg_queue_push(msg, 1, 120, true); + runloop_msg_queue_push(msg, 1, 120, true); RARCH_LOG("%s \"%s\".\n", msg_hash_to_str(MSG_APPLYING_SHADER), shader); @@ -759,9 +759,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()) - rarch_main_msg_queue_push_new(MSG_SLOW_MOTION_REWIND, 0, 30, true); + runloop_msg_queue_push_new(MSG_SLOW_MOTION_REWIND, 0, 30, true); else - rarch_main_msg_queue_push_new(MSG_SLOW_MOTION, 0, 30, true); + runloop_msg_queue_push_new(MSG_SLOW_MOTION, 0, 30, true); } break; case RUNLOOP_CTL_CHECK_MOVIE: @@ -774,7 +774,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) if (!bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) return false; - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_MOVIE_RECORD_STOPPED, 2, 180, true); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_RECORD_STOPPED)); @@ -807,14 +807,14 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) return false; else if (bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) { - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); RARCH_LOG("%s \"%s\".\n", msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO), path); } else { - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_FAILED_TO_START_MOVIE_RECORD, 1, 180, true); RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_START_MOVIE_RECORD)); @@ -825,7 +825,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) if (!bsv_movie_ctl(BSV_MOVIE_CTL_END, NULL)) return false; - rarch_main_msg_queue_push_new( + runloop_msg_queue_push_new( MSG_MOVIE_PLAYBACK_ENDED, 1, 180, false); RARCH_LOG("%s\n", msg_hash_to_str(MSG_MOVIE_PLAYBACK_ENDED)); @@ -1375,6 +1375,6 @@ void runloop_data_iterate(void) void data_runloop_osd_msg(const char *msg, size_t len) { - rarch_main_msg_queue_push(msg, 1, 10, true); + runloop_msg_queue_push(msg, 1, 10, true); } diff --git a/runloop.h b/runloop.h index a773e75ed7..d8d6c1cad4 100644 --- a/runloop.h +++ b/runloop.h @@ -297,13 +297,13 @@ global_t *global_get_ptr(void); **/ int runloop_iterate(unsigned *sleep_ms); -void rarch_main_msg_queue_push(const char *msg, unsigned prio, +void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); -void rarch_main_msg_queue_push_new(uint32_t hash, unsigned prio, +void runloop_msg_queue_push_new(uint32_t hash, unsigned prio, unsigned duration, bool flush); -const char *rarch_main_msg_queue_pull(void); +const char *runloop_msg_queue_pull(void); bool *runloop_perfcnt_enabled(void); diff --git a/screenshot.c b/screenshot.c index a9114243c7..51b283cd05 100644 --- a/screenshot.c +++ b/screenshot.c @@ -270,7 +270,7 @@ bool take_screenshot(void) is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); - rarch_main_msg_queue_push(msg, 1, is_paused ? 1 : 180, true); + runloop_msg_queue_push(msg, 1, is_paused ? 1 : 180, true); if (is_paused) video_driver_ctl(RARCH_DISPLAY_CTL_CACHED_FRAME_RENDER, NULL); diff --git a/tasks/task_database.c b/tasks/task_database.c index 9bd8d6fab0..c7e041e3cc 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -107,7 +107,7 @@ static int database_info_iterate_start(database_info_handle_t *db, #endif if (msg[0] != '\0') - rarch_main_msg_queue_push(msg, 1, 180, true); + runloop_msg_queue_push(msg, 1, 180, true); #if 0 RARCH_LOG("msg: %s\n", msg); @@ -526,7 +526,7 @@ static void rarch_dbscan_task_handler(rarch_task_t *task) } else { - rarch_main_msg_queue_push_new(MSG_SCANNING_OF_DIRECTORY_FINISHED, 0, 180, true); + runloop_msg_queue_push_new(MSG_SCANNING_OF_DIRECTORY_FINISHED, 0, 180, true); goto task_finished; } break; diff --git a/tasks/tasks.c b/tasks/tasks.c index 27a2ce56a4..5bef36a8a7 100644 --- a/tasks/tasks.c +++ b/tasks/tasks.c @@ -62,7 +62,7 @@ void task_msg_queue_pushf(unsigned prio, unsigned duration, va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); - rarch_main_msg_queue_push(buf, prio, duration, flush); + runloop_msg_queue_push(buf, prio, duration, flush); } static void push_task_progress(rarch_task_t *task)