Skip to content

Commit

Permalink
Revert "Rename runloop_msg_queue_push to video_driver_msg_queue_push"
Browse files Browse the repository at this point in the history
This reverts commit ad73869.
  • Loading branch information
inactive123 committed Dec 22, 2016
1 parent b07fd17 commit 77e5cdb
Show file tree
Hide file tree
Showing 50 changed files with 261 additions and 305 deletions.
4 changes: 1 addition & 3 deletions camera/camera_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include "../list_special.h"
#include "../verbosity.h"

#include "../gfx/video_driver.h"

static const camera_driver_t *camera_drivers[] = {
#ifdef HAVE_V4L2
&camera_v4l2,
Expand Down Expand Up @@ -193,7 +191,7 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
if (settings->camera.allow)
return camera_driver->start(camera_data);

video_driver_msg_queue_push(
runloop_msg_queue_push(
"Camera is explicitly disabled.\n", 1, 180, false);
}
break;
Expand Down
15 changes: 7 additions & 8 deletions cheevos.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "cheevos.h"
#include "command.h"
#include "dynamic.h"
#include "gfx/video_driver.h"
#include "network/net_http_special.h"
#include "tasks/tasks_internal.h"
#include "configuration.h"
Expand Down Expand Up @@ -1832,8 +1831,8 @@ static int cheevos_login(retro_time_t *timeout)

if (!username || !*username || !password || !*password)
{
video_driver_msg_queue_push("Missing Retro Achievements account information.", 0, 5 * 60, false);
video_driver_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_ERR("CHEEVOS username and/or password not informed.\n");
return -1;
}
Expand Down Expand Up @@ -1864,7 +1863,7 @@ static int cheevos_login(retro_time_t *timeout)
return 0;
}

video_driver_msg_queue_push("Retro Achievements login error.",
runloop_msg_queue_push("Retro Achievements login error.",
0, 5 * 60, false);
RARCH_ERR("CHEEVOS error getting user token.\n");
return -1;
Expand Down Expand Up @@ -1939,8 +1938,8 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
RARCH_LOG("CHEEVOS awarding cheevo %u: %s (%s).\n",
cheevo->id, cheevo->title, cheevo->description);

video_driver_msg_queue_push(cheevo->title, 0, 3 * 60, false);
video_driver_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);

cheevos_make_unlock_url(cheevo, url, sizeof(url));
task_push_http_transfer(url, true, NULL, cheevos_unlocked, cheevo);
Expand Down Expand Up @@ -2688,7 +2687,7 @@ bool cheevos_load(const void *data)
free((void*)json);
}

video_driver_msg_queue_push("Error loading achievements.", 0, 5 * 60, false);
runloop_msg_queue_push("Error loading achievements.", 0, 5 * 60, false);
RARCH_ERR("CHEEVOS error loading achievements.\n");
return false;
}
Expand Down Expand Up @@ -2861,7 +2860,7 @@ bool cheevos_toggle_hardcore_mode(void)
command_event(CMD_EVENT_REWIND_DEINIT, NULL);

RARCH_LOG("%s\n", msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE));
video_driver_msg_queue_push(
runloop_msg_queue_push(
msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE), 0, 3 * 60, true);
}
else
Expand Down
41 changes: 20 additions & 21 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
#include "audio/audio_driver.h"
#include "record/record_driver.h"
#include "file_path_special.h"
#include "gfx/video_driver.h"
#include "autosave.h"
#include "core_info.h"
#include "core_type.h"
Expand Down Expand Up @@ -186,7 +185,7 @@ static bool command_set_shader(const char *arg)
}

snprintf(msg, sizeof(msg), "Shader: \"%s\"", arg);
video_driver_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);
Expand Down Expand Up @@ -890,7 +889,7 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)

/* Only noise in menu. */
if (print_log)
video_driver_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true);
}
}

Expand Down Expand Up @@ -950,7 +949,7 @@ static void command_event_disk_control_set_index(unsigned idx)
RARCH_ERR("%s\n", msg);
else
RARCH_LOG("%s\n", msg);
video_driver_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true);
}
}

Expand Down Expand Up @@ -993,7 +992,7 @@ static bool command_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);
video_driver_msg_queue_push(msg, 0, 180, true);
runloop_msg_queue_push(msg, 0, 180, true);

command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL);

Expand Down Expand Up @@ -1100,7 +1099,7 @@ static void command_event_set_volume(float gain)
snprintf(msg, sizeof(msg), "%s: %.1f dB",
msg_hash_to_str(MSG_AUDIO_VOLUME),
settings->audio.volume);
video_driver_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));
Expand Down Expand Up @@ -1512,7 +1511,7 @@ static bool command_event_save_core_config(void)
sizeof(config_dir));
else
{
video_driver_msg_queue_push(msg_hash_to_str(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;
}
Expand Down Expand Up @@ -1577,7 +1576,7 @@ static bool command_event_save_core_config(void)

command_event_save_config(config_path, msg, sizeof(msg));

video_driver_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true);

if (overrides_active)
runloop_ctl(RUNLOOP_CTL_SET_OVERRIDES_ACTIVE, NULL);
Expand Down Expand Up @@ -1617,7 +1616,7 @@ static void command_event_save_current_config(int override_type)
command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg));

if (!string_is_empty(msg))
video_driver_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true);
}

static void command_event_undo_save_state(char *s, size_t len)
Expand Down Expand Up @@ -1710,7 +1709,7 @@ static void command_event_main_state(unsigned cmd)
MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES), sizeof(msg));

if (push_msg)
video_driver_msg_queue_push(msg, 2, 180, true);
runloop_msg_queue_push(msg, 2, 180, true);
RARCH_LOG("%s\n", msg);
}

Expand Down Expand Up @@ -1779,7 +1778,7 @@ bool command_event(enum event_command cmd, void *data)
snprintf(msg, sizeof(msg),"%s: %dx%d",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION),
width, height);
video_driver_msg_queue_push(msg, 1, 100, true);
runloop_msg_queue_push(msg, 1, 100, true);
}
}
#endif
Expand Down Expand Up @@ -1874,7 +1873,7 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_RESET:
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
video_driver_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true);

#ifdef HAVE_CHEEVOS
cheevos_set_cheats();
Expand Down Expand Up @@ -2032,7 +2031,7 @@ bool command_event(enum event_command cmd, void *data)
return false;
}

video_driver_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true);
RARCH_LOG("%s\n", msg);
}
break;
Expand Down Expand Up @@ -2225,15 +2224,15 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_SHUTDOWN:
#if defined(__linux__) && !defined(ANDROID)
video_driver_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true);
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -P now");
#endif
break;
case CMD_EVENT_REBOOT:
#if defined(__linux__) && !defined(ANDROID)
video_driver_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true);
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -r now");
Expand Down Expand Up @@ -2278,7 +2277,7 @@ bool command_event(enum event_command cmd, void *data)
command_event(CMD_EVENT_AUDIO_STOP, NULL);

is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL);
video_driver_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1, is_paused ? 1: 30, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1, is_paused ? 1: 30, true);

if (settings->video.black_frame_insertion || is_paused)
{
Expand Down Expand Up @@ -2426,7 +2425,7 @@ bool command_event(enum event_command cmd, void *data)
}
}
else
video_driver_msg_queue_push(
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
break;
Expand All @@ -2446,7 +2445,7 @@ bool command_event(enum event_command cmd, void *data)
command_event_check_disk_next(control);
}
else
video_driver_msg_queue_push(
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
break;
Expand All @@ -2466,7 +2465,7 @@ bool command_event(enum event_command cmd, void *data)
command_event_check_disk_prev(control);
}
else
video_driver_msg_queue_push(
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
break;
Expand Down Expand Up @@ -2527,7 +2526,7 @@ bool command_event(enum event_command cmd, void *data)
input_driver_set_hotkey_block();
input_driver_keyboard_mapping_set_block(1);
if (mode != -1)
video_driver_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
1, 120, true);
}
else
Expand All @@ -2537,7 +2536,7 @@ bool command_event(enum event_command cmd, void *data)
input_driver_unset_hotkey_block();
input_driver_keyboard_mapping_set_block(0);
if (mode != -1)
video_driver_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
1, 120, true);
}

Expand Down
7 changes: 3 additions & 4 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "file_path_special.h"
#include "audio/audio_driver.h"
#include "gfx/video_driver.h"
#include "configuration.h"
#include "content.h"
#include "config.def.h"
Expand Down Expand Up @@ -2321,7 +2320,7 @@ bool config_load_override(void)
/* Restore the libretro_path we're using
* since it will be overwritten by the override when reloading. */
path_set(RARCH_PATH_CORE, buf);
video_driver_msg_queue_push("Configuration override loaded.", 1, 100, true);
runloop_msg_queue_push("Configuration override loaded.", 1, 100, true);

/* Reset save paths. */
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL);
Expand Down Expand Up @@ -2428,7 +2427,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))
{
video_driver_msg_queue_push("Game remap file loaded.", 1, 100, true);
runloop_msg_queue_push("Game remap file loaded.", 1, 100, true);
return true;
}
}
Expand All @@ -2447,7 +2446,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))
{
video_driver_msg_queue_push("Core remap file loaded.", 1, 100, true);
runloop_msg_queue_push("Core remap file loaded.", 1, 100, true);
return true;
}
}
Expand Down
4 changes: 1 addition & 3 deletions dirs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "runloop.h"
#include "verbosity.h"

#include "gfx/video_driver.h"

struct rarch_dir_list
{
struct string_list *list;
Expand Down Expand Up @@ -158,7 +156,7 @@ void dir_check_shader(bool pressed_next, bool pressed_prev)
snprintf(msg, sizeof(msg), "%s #%u: \"%s\".",
msg_hash_to_str(MSG_SHADER),
(unsigned)dir_list->ptr, shader);
video_driver_msg_queue_push(msg, 2, 120, true);
runloop_msg_queue_push(msg, 2, 120, true);

RARCH_LOG("%s \"%s\".\n",
msg_hash_to_str(MSG_APPLYING_SHADER),
Expand Down
2 changes: 1 addition & 1 deletion driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ 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())
{
video_driver_msg_queue_push(
runloop_msg_queue_push(
msg_hash_to_str(MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT),
2, 180, false);
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
Expand Down
5 changes: 2 additions & 3 deletions dynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "core.h"
#include "driver.h"
#include "performance_counters.h"
#include "gfx/video_driver.h"
#include "gfx/video_context_driver.h"

#include "cores/internal_cores.h"
Expand Down Expand Up @@ -252,7 +251,7 @@ static bool load_dynamic_core(void)
path_get(RARCH_PATH_CORE));
RARCH_ERR("Error(s): %s\n", dylib_error());

video_driver_msg_queue_push(msg_hash_to_str(MSG_FAILED_TO_OPEN_LIBRETRO_CORE), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_FAILED_TO_OPEN_LIBRETRO_CORE), 1, 180, true);

return false;
}
Expand Down Expand Up @@ -1011,7 +1010,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);
video_driver_msg_queue_push(msg->msg, 3, msg->frames, true);
runloop_msg_queue_push(msg->msg, 3, msg->frames, true);
break;
}

Expand Down
3 changes: 1 addition & 2 deletions gfx/common/x11_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "../../input/common/input_x11_common.h"
#include "../../configuration.h"
#include "../../verbosity.h"
#include "../../gfx/video_driver.h"
#include "../../runloop.h"

#ifdef HAVE_DBUS
Expand Down Expand Up @@ -731,7 +730,7 @@ void x11_update_window_title(void *data)
if (video_monitor_get_fps(buf, sizeof(buf), buf_fps, sizeof(buf_fps)))
XStoreName(g_x11_dpy, g_x11_win, buf);
if (settings->fps_show)
video_driver_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)
Expand Down
4 changes: 2 additions & 2 deletions gfx/drivers/exynos_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
#include "../../config.h"
#endif

#include "../video_driver.h"
#include "../common/drm_common.h"
#include "../font_driver.h"
#include "../../retroarch.h"
#include "../../runloop.h"
#include "../../runloop.h"

/* TODO: Honor these properties: vsync, menu rotation, menu alpha, aspect ratio change */

Expand Down Expand Up @@ -1313,7 +1313,7 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width,

video_monitor_get_fps(buffer, sizeof(buffer),
settings->fps_show ? buffer_fps : NULL, sizeof(buffer_fps));
video_driver_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 *
Expand Down
Loading

0 comments on commit 77e5cdb

Please sign in to comment.