mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-01 12:11:43 +00:00
Merge pull request #8561 from natinusala/master
Reimplement missing menu widgets
This commit is contained in:
commit
8aaef0e95c
4
.gitignore
vendored
4
.gitignore
vendored
@ -76,6 +76,10 @@ convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
info
|
||||
content_image_history.lpl
|
||||
saves
|
||||
screenshots
|
||||
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
|
21
command.c
21
command.c
@ -59,6 +59,9 @@
|
||||
#include "menu/menu_content.h"
|
||||
#include "menu/menu_shader.h"
|
||||
#include "menu/widgets/menu_dialog.h"
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
#include "menu/widgets/menu_widgets.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
@ -971,7 +974,10 @@ static void command_event_set_volume(float gain)
|
||||
msg_hash_to_str(MSG_AUDIO_VOLUME),
|
||||
new_volume);
|
||||
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_volume_update_and_show())
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
|
||||
@ -2104,9 +2110,11 @@ TODO: Add a setting for these tweaks */
|
||||
return false;
|
||||
}
|
||||
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_volume_update_and_show())
|
||||
#endif
|
||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
RARCH_LOG("%s\n", msg);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_SEND_DEBUG_INFO:
|
||||
@ -2488,6 +2496,9 @@ TODO: Add a setting for these tweaks */
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_set_paused(is_paused))
|
||||
#endif
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
|
||||
1, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
@ -2502,6 +2513,10 @@ TODO: Add a setting for these tweaks */
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (video_driver_has_widgets())
|
||||
menu_widgets_set_paused(is_paused);
|
||||
#endif
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_UNPAUSED));
|
||||
command_event(CMD_EVENT_AUDIO_START, NULL);
|
||||
}
|
||||
|
@ -47,6 +47,9 @@
|
||||
#ifdef HAVE_MENU
|
||||
#include "../menu/menu_driver.h"
|
||||
#include "../menu/menu_setting.h"
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
#include "../menu/widgets/menu_widgets.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "video_thread_wrapper.h"
|
||||
@ -2596,7 +2599,10 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
|
||||
/* Display the FPS, with a higher priority. */
|
||||
if (video_info.fps_show || video_info.framecount_show)
|
||||
runloop_msg_queue_push(video_info.fps_text, 2, 1, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_set_fps_text(video_info.fps_text))
|
||||
#endif
|
||||
runloop_msg_queue_push(video_info.fps_text, 2, 1, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
/* trigger set resolution*/
|
||||
if (video_info.crt_switch_resolution)
|
||||
|
@ -507,11 +507,6 @@ if [ "$HAVE_MENU" != 'no' ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$HAVE_MENU_WIDGETS" != 'no' ]; then
|
||||
die : 'Notice: Menu widgets are not fully implemented and should not be enabled' \
|
||||
'Please do not report any bug concerning widgets until this message is removed'
|
||||
fi
|
||||
|
||||
check_macro NEON __ARM_NEON__
|
||||
|
||||
add_define MAKEFILE OS "$OS"
|
||||
|
54
retroarch.c
54
retroarch.c
@ -4048,8 +4048,17 @@ static enum runloop_state runloop_check_state(
|
||||
|
||||
/* Display the fast forward state to the user, if needed. */
|
||||
if (runloop_fastmotion)
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_FAST_FORWARD), 1, 1, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets() || !menu_widgets_set_fast_forward(true))
|
||||
#endif
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_FAST_FORWARD), 1, 1, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
else
|
||||
menu_widgets_set_fast_forward(false);
|
||||
#endif
|
||||
|
||||
old_button_state = new_button_state;
|
||||
old_hold_button_state = new_hold_button_state;
|
||||
@ -4137,10 +4146,20 @@ static enum runloop_state runloop_check_state(
|
||||
|
||||
s[0] = '\0';
|
||||
|
||||
if (state_manager_check_rewind(BIT256_GET(current_input, RARCH_REWIND),
|
||||
settings->uints.rewind_granularity, runloop_is_paused, s, sizeof(s), &t))
|
||||
runloop_msg_queue_push(s, 0, t, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
bool rewinding = state_manager_check_rewind(BIT256_GET(current_input, RARCH_REWIND),
|
||||
settings->uints.rewind_granularity, runloop_paused, s, sizeof(s), &t);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets())
|
||||
#endif
|
||||
if (state_manager_check_rewind(BIT256_GET(current_input, RARCH_REWIND),
|
||||
settings->uints.rewind_granularity, runloop_is_paused, s, sizeof(s), &t))
|
||||
runloop_msg_queue_push(s, 0, t, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
menu_widgets_set_rewind(rewinding);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Checks if slowmotion toggle/hold was being pressed and/or held. */
|
||||
@ -4176,15 +4195,22 @@ static enum runloop_state runloop_check_state(
|
||||
if (!runloop_idle)
|
||||
video_driver_cached_frame();
|
||||
|
||||
if (state_manager_frame_is_reversed())
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_SLOW_MOTION_REWIND), 1, 1, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_SLOW_MOTION), 1, 1, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!video_driver_has_widgets())
|
||||
{
|
||||
#endif
|
||||
if (state_manager_frame_is_reversed())
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_SLOW_MOTION_REWIND), 1, 1, false, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_SLOW_MOTION), 1, 1, false,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
}
|
||||
#endif
|
||||
|
||||
old_slowmotion_button_state = new_slowmotion_button_state;
|
||||
old_slowmotion_hold_button_state = new_slowmotion_hold_button_state;
|
||||
|
@ -43,6 +43,10 @@
|
||||
#define IMG_EXT "bmp"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
#include "../../menu/widgets/menu_widgets.h"
|
||||
#endif
|
||||
|
||||
#include "../defaults.h"
|
||||
#include "../command.h"
|
||||
#include "../configuration.h"
|
||||
@ -126,6 +130,11 @@ static bool screenshot_dump_direct(screenshot_task_state_t *state)
|
||||
bmp_type);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!state->silence)
|
||||
menu_widgets_screenshot_taken(state->shotname, state->filename);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -290,6 +299,11 @@ static bool screenshot_dump(
|
||||
|
||||
if (use_thread)
|
||||
{
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (video_driver_has_widgets())
|
||||
task_free_title(task);
|
||||
else
|
||||
#endif
|
||||
if (!savestate)
|
||||
task->title = strdup(msg_hash_to_str(MSG_TAKING_SCREENSHOT));
|
||||
|
||||
@ -444,6 +458,11 @@ bool take_screenshot(const char *name_base, bool silence, bool has_valid_framebu
|
||||
bool is_perfcnt_enable = false;
|
||||
bool ret = false;
|
||||
|
||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||
if (!silence)
|
||||
menu_widgets_take_screenshot();
|
||||
#endif
|
||||
|
||||
runloop_get_status(&is_paused, &is_idle, &is_slowmotion, &is_perfcnt_enable);
|
||||
|
||||
ret = take_screenshot_choice(name_base, silence, is_paused, is_idle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user