mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
Update more old code to go through the new wrapper function
This commit is contained in:
parent
2706644b1e
commit
761177a885
@ -7,6 +7,7 @@
|
||||
#include "../../gfx/video_monitor.h"
|
||||
#include "../../gfx/video_context_driver.h"
|
||||
#include "../../gfx/gl_common.h"
|
||||
#include "../../runloop.h"
|
||||
|
||||
//#define HAVE_NSOPENGL
|
||||
|
||||
@ -287,7 +288,7 @@ static void apple_gfx_ctx_update_window_title(void *data)
|
||||
[[g_view window] setTitle:[NSString stringWithCString:text encoding:NSUTF8StringEncoding]];
|
||||
#endif
|
||||
if (g_settings.fps_show)
|
||||
msg_queue_push(g_runloop.msg_queue, buf_fps, 1, 1);
|
||||
rarch_main_msg_queue_push(buf_fps, 1, 1, false);
|
||||
}
|
||||
|
||||
static bool apple_gfx_ctx_has_focus(void *data)
|
||||
|
@ -152,8 +152,8 @@ bool driver_camera_start(void)
|
||||
if (g_settings.camera.allow)
|
||||
return driver.camera->start(driver.camera_data);
|
||||
|
||||
msg_queue_push(g_runloop.msg_queue,
|
||||
"Camera is explicitly disabled.\n", 1, 180);
|
||||
rarch_main_msg_queue_push(
|
||||
"Camera is explicitly disabled.\n", 1, 180, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ bool menu_load_content(void)
|
||||
|
||||
fill_pathname_base(name, g_extern.fullpath, sizeof(name));
|
||||
snprintf(msg, sizeof(msg), "Failed to load %s.\n", name);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 90);
|
||||
rarch_main_msg_queue_push(msg, 1, 90, false);
|
||||
|
||||
if (driver.menu)
|
||||
driver.menu->msg_force = true;
|
||||
|
@ -898,8 +898,7 @@ static int action_ok_core_updater_download(const char *path,
|
||||
strlcpy(core_updater_path, path, sizeof(core_updater_path));
|
||||
snprintf(msg, sizeof(msg), "Starting download: %s.", path);
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 90);
|
||||
rarch_main_msg_queue_push(msg, 1, 90, true);
|
||||
|
||||
msg_queue_clear(g_data_runloop.http.msg_queue);
|
||||
msg_queue_push_string_list(g_data_runloop.http.msg_queue, core_path, "cb_core_updater_download", 0, 1);
|
||||
|
58
retroarch.c
58
retroarch.c
@ -943,7 +943,7 @@ static void init_movie(void)
|
||||
}
|
||||
|
||||
g_extern.bsv.movie_playback = true;
|
||||
msg_queue_push(g_runloop.msg_queue, "Starting movie playback.", 2, 180);
|
||||
rarch_main_msg_queue_push("Starting movie playback.", 2, 180, false);
|
||||
RARCH_LOG("Starting movie playback.\n");
|
||||
g_settings.rewind_granularity = 1;
|
||||
}
|
||||
@ -953,17 +953,15 @@ static void init_movie(void)
|
||||
snprintf(msg, sizeof(msg), "Starting movie record to \"%s\".",
|
||||
g_extern.bsv.movie_start_path);
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
|
||||
if (!(g_extern.bsv.movie = bsv_movie_init(g_extern.bsv.movie_start_path,
|
||||
RARCH_MOVIE_RECORD)))
|
||||
{
|
||||
msg_queue_push(g_runloop.msg_queue, "Failed to start movie record.", 1, 180);
|
||||
rarch_main_msg_queue_push("Failed to start movie record.", 1, 180, true);
|
||||
RARCH_ERR("Failed to start movie record.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
RARCH_LOG("Starting movie record to \"%s\".\n",
|
||||
g_extern.bsv.movie_start_path);
|
||||
g_settings.rewind_granularity = 1;
|
||||
@ -1018,10 +1016,9 @@ static bool init_netplay(void)
|
||||
g_extern.netplay_is_client = false;
|
||||
RARCH_WARN(RETRO_LOG_INIT_NETPLAY_FAILED);
|
||||
|
||||
if (g_runloop.msg_queue)
|
||||
msg_queue_push(g_runloop.msg_queue,
|
||||
RETRO_MSG_INIT_NETPLAY_FAILED,
|
||||
0, 180);
|
||||
rarch_main_msg_queue_push(
|
||||
RETRO_MSG_INIT_NETPLAY_FAILED,
|
||||
0, 180, false);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@ -1272,7 +1269,7 @@ static void load_auto_state(void)
|
||||
|
||||
snprintf(msg, sizeof(msg), "Auto-loading savestate from \"%s\" %s.",
|
||||
savestate_name_auto, ret ? "succeeded" : "failed");
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
rarch_main_msg_queue_push(msg, 1, 180, false);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
@ -1371,8 +1368,7 @@ static void main_state(unsigned cmd)
|
||||
else
|
||||
strlcpy(msg, "Core does not support save states.", sizeof(msg));
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 2, 180);
|
||||
rarch_main_msg_queue_push(msg, 2, 180, true);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
|
||||
@ -1402,8 +1398,7 @@ void rarch_disk_control_append_image(const char *path)
|
||||
|
||||
snprintf(msg, sizeof(msg), "Appended disk: %s", path);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 0, 180);
|
||||
rarch_main_msg_queue_push(msg, 0, 180, true);
|
||||
|
||||
rarch_main_command(RARCH_CMD_AUTOSAVE_DEINIT);
|
||||
|
||||
@ -1463,10 +1458,7 @@ void rarch_disk_control_set_eject(bool new_state, bool print_log)
|
||||
|
||||
/* Only noise in menu. */
|
||||
if (print_log)
|
||||
{
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
}
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1515,8 +1507,7 @@ void rarch_disk_control_set_index(unsigned idx)
|
||||
RARCH_ERR("%s\n", msg);
|
||||
else
|
||||
RARCH_LOG("%s\n", msg);
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2070,8 +2061,7 @@ static bool save_core_config(void)
|
||||
else
|
||||
{
|
||||
const char *message = "Config directory not set. Cannot save new config.";
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, message, 1, 180);
|
||||
rarch_main_msg_queue_push(message, 1, 180, true);
|
||||
RARCH_ERR("%s\n", message);
|
||||
return false;
|
||||
}
|
||||
@ -2133,8 +2123,7 @@ static bool save_core_config(void)
|
||||
RARCH_ERR("%s\n", msg);
|
||||
}
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -2249,8 +2238,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
break;
|
||||
case RARCH_CMD_RESET:
|
||||
RARCH_LOG(RETRO_LOG_RESETTING_CONTENT);
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, "Reset.", 1, 120);
|
||||
rarch_main_msg_queue_push("Reset.", 1, 120, true);
|
||||
pretro_reset();
|
||||
|
||||
/* bSNES since v073r01 resets controllers to JOYPAD
|
||||
@ -2379,8 +2367,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, msg, 1, 180);
|
||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
break;
|
||||
@ -2753,10 +2740,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
check_disk_eject(control);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, "Core does not support Disk Options.", 1, 120);
|
||||
}
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_DISK_NEXT:
|
||||
if (g_extern.system.disk_control.get_num_images)
|
||||
@ -2774,10 +2758,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
check_disk_next(control);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, "Core does not support Disk Options.", 1, 120);
|
||||
}
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_DISK_PREV:
|
||||
if (g_extern.system.disk_control.get_num_images)
|
||||
@ -2795,10 +2776,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
check_disk_prev(control);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
msg_queue_push(g_runloop.msg_queue, "Core does not support Disk Options.", 1, 120);
|
||||
}
|
||||
rarch_main_msg_queue_push("Core does not support Disk Options.", 1, 120, true);
|
||||
break;
|
||||
case RARCH_CMD_RUMBLE_STOP:
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
|
@ -233,14 +233,13 @@ static void check_rewind(bool pressed)
|
||||
{
|
||||
const void *buf = NULL;
|
||||
|
||||
msg_queue_clear(g_runloop.msg_queue);
|
||||
if (state_manager_pop(g_extern.rewind.state, &buf))
|
||||
{
|
||||
g_extern.rewind.frame_is_reverse = true;
|
||||
setup_rewind_audio();
|
||||
|
||||
rarch_main_msg_queue_push(RETRO_MSG_REWINDING, 0,
|
||||
g_runloop.is_paused ? 1 : 30, false);
|
||||
g_runloop.is_paused ? 1 : 30, true);
|
||||
pretro_unserialize(buf, g_extern.rewind.size);
|
||||
|
||||
if (g_extern.bsv.movie)
|
||||
@ -248,7 +247,7 @@ static void check_rewind(bool pressed)
|
||||
}
|
||||
else
|
||||
rarch_main_msg_queue_push(RETRO_MSG_REWIND_REACHED_END,
|
||||
0, 30, false);
|
||||
0, 30, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <xgraphics.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include "../screenshot.h"
|
||||
#include "../runloop.h"
|
||||
|
||||
bool screenshot_dump(const char *folder, const void *frame,
|
||||
unsigned width, unsigned height, int pitch, bool bgr24)
|
||||
@ -44,7 +45,7 @@ bool screenshot_dump(const char *folder, const void *frame,
|
||||
if(ret == S_OK)
|
||||
{
|
||||
RARCH_LOG("Screenshot saved: %s.\n", filename);
|
||||
msg_queue_push(g_runloop.msg_queue, "Screenshot saved.", 1, 30);
|
||||
rarch_main_msg_queue_push("Screenshot saved.", 1, 30, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user