mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
libui: Changes for LIBUI
This commit is contained in:
parent
d78ea9cffc
commit
0996291d91
36
command.c
36
command.c
@ -1857,7 +1857,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
/* Only enable state manager if netplay is not underway
|
/* Only enable state manager if netplay is not underway
|
||||||
TODO: Add a setting for these tweaks */
|
TODO: Add a setting for these tweaks */
|
||||||
if (settings->bools.rewind_enable
|
if (settings->bools.rewind_enable
|
||||||
&& !netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL))
|
&& !netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL))
|
||||||
@ -1886,7 +1886,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
{
|
{
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
/* Only enable state manager if netplay is not underway
|
/* Only enable state manager if netplay is not underway
|
||||||
TODO: Add a setting for these tweaks */
|
TODO: Add a setting for these tweaks */
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
if (settings->uints.autosave_interval != 0
|
if (settings->uints.autosave_interval != 0
|
||||||
@ -2124,7 +2124,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
* need to make sure to keep a copy */
|
* need to make sure to keep a copy */
|
||||||
struct retro_hw_render_callback hwr_copy;
|
struct retro_hw_render_callback hwr_copy;
|
||||||
struct retro_hw_render_callback *hwr = video_driver_get_hw_context();
|
struct retro_hw_render_callback *hwr = video_driver_get_hw_context();
|
||||||
const struct retro_hw_render_context_negotiation_interface *iface =
|
const struct retro_hw_render_context_negotiation_interface *iface =
|
||||||
video_driver_get_context_negotiation_interface();
|
video_driver_get_context_negotiation_interface();
|
||||||
memcpy(&hwr_copy, hwr, sizeof(hwr_copy));
|
memcpy(&hwr_copy, hwr, sizeof(hwr_copy));
|
||||||
|
|
||||||
@ -2197,7 +2197,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
|
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
|
||||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||||
|
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
||||||
1, true);
|
1, true);
|
||||||
|
|
||||||
if (!is_idle)
|
if (!is_idle)
|
||||||
@ -2280,15 +2280,15 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
|
|
||||||
if (!init_netplay(NULL, hostname ? hostname :
|
if (!init_netplay(NULL, hostname ? hostname :
|
||||||
settings->paths.netplay_server,
|
settings->paths.netplay_server,
|
||||||
settings->uints.netplay_port))
|
settings->uints.netplay_port))
|
||||||
{
|
{
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable rewind & sram autosave if it was enabled
|
/* Disable rewind & sram autosave if it was enabled
|
||||||
TODO: Add a setting for these tweaks */
|
TODO: Add a setting for these tweaks */
|
||||||
state_manager_event_deinit();
|
state_manager_event_deinit();
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
@ -2306,12 +2306,12 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
|
|
||||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||||
? atoi(hostname->elems[1].data) : 55435);
|
? atoi(hostname->elems[1].data) : 55435);
|
||||||
|
|
||||||
if (!init_netplay(NULL, hostname->elems[0].data,
|
if (!init_netplay(NULL, hostname->elems[0].data,
|
||||||
!string_is_empty(hostname->elems[1].data)
|
!string_is_empty(hostname->elems[1].data)
|
||||||
? atoi(hostname->elems[1].data) : 55435))
|
? atoi(hostname->elems[1].data) : 55435))
|
||||||
{
|
{
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
@ -2321,7 +2321,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
string_list_free(hostname);
|
string_list_free(hostname);
|
||||||
|
|
||||||
/* Disable rewind if it was enabled
|
/* Disable rewind if it was enabled
|
||||||
TODO: Add a setting for these tweaks */
|
TODO: Add a setting for these tweaks */
|
||||||
state_manager_event_deinit();
|
state_manager_event_deinit();
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
@ -2339,12 +2339,12 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
|
|
||||||
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
RARCH_LOG("[netplay] connecting to %s:%d\n",
|
||||||
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
|
||||||
? atoi(hostname->elems[1].data) : 55435);
|
? atoi(hostname->elems[1].data) : 55435);
|
||||||
|
|
||||||
if (!init_netplay_deferred(hostname->elems[0].data,
|
if (!init_netplay_deferred(hostname->elems[0].data,
|
||||||
!string_is_empty(hostname->elems[1].data)
|
!string_is_empty(hostname->elems[1].data)
|
||||||
? atoi(hostname->elems[1].data) : 55435))
|
? atoi(hostname->elems[1].data) : 55435))
|
||||||
{
|
{
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
@ -2354,7 +2354,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
|
|
||||||
string_list_free(hostname);
|
string_list_free(hostname);
|
||||||
|
|
||||||
/* Disable rewind if it was enabled
|
/* Disable rewind if it was enabled
|
||||||
TODO: Add a setting for these tweaks */
|
TODO: Add a setting for these tweaks */
|
||||||
state_manager_event_deinit();
|
state_manager_event_deinit();
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
@ -2531,7 +2531,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
{
|
{
|
||||||
static bool game_focus_state = false;
|
static bool game_focus_state = false;
|
||||||
intptr_t mode = (intptr_t)data;
|
intptr_t mode = (intptr_t)data;
|
||||||
|
|
||||||
/* mode = -1: restores current game focus state
|
/* mode = -1: restores current game focus state
|
||||||
* mode = 1: force set game focus, instead of toggling
|
* mode = 1: force set game focus, instead of toggling
|
||||||
* any other: toggle
|
* any other: toggle
|
||||||
@ -2593,7 +2593,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
command_event_restore_default_shader_preset();
|
command_event_restore_default_shader_preset();
|
||||||
break;
|
break;
|
||||||
case CMD_EVENT_LIBUI_TEST:
|
case CMD_EVENT_LIBUI_TEST:
|
||||||
#if 0
|
#if 1
|
||||||
libui_main();
|
libui_main();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -2402,7 +2402,7 @@ static enum runloop_state runloop_check_state(
|
|||||||
current_input, RARCH_GRAB_MOUSE_TOGGLE);
|
current_input, RARCH_GRAB_MOUSE_TOGGLE);
|
||||||
|
|
||||||
if (pressed && !old_pressed)
|
if (pressed && !old_pressed)
|
||||||
#if 1
|
#if 0
|
||||||
command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL);
|
command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL);
|
||||||
#else
|
#else
|
||||||
command_event(CMD_EVENT_LIBUI_TEST, NULL);
|
command_event(CMD_EVENT_LIBUI_TEST, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user