(Show Inputs on Overlay) DISABLE_MENU=1 buildfix + Qt settings update

This commit is contained in:
jdgleaver 2021-05-26 18:15:23 +01:00
parent 0dfb2b57fb
commit 8e54b4cec9
8 changed files with 40 additions and 12 deletions

View File

@ -48,6 +48,11 @@
#include "menu/menu_screensaver.h"
#endif
/* Required for 'show inputs on overlay' setting */
#if defined(HAVE_OVERLAY)
#include "../input/input_overlay.h"
#endif
#if defined(HW_RVL)
#define MAX_GAMMA_SETTING 30
#elif defined(GEKKO)
@ -742,11 +747,13 @@ static const unsigned input_backtouch_toggle = false;
#define DEFAULT_OVERLAY_ENABLE_AUTOPREFERRED true
#if defined(HAVE_OVERLAY)
#if defined(RARCH_MOBILE)
#define DEFAULT_OVERLAY_SHOW_INPUTS OVERLAY_SHOW_INPUT_TOUCHED
#else
#define DEFAULT_OVERLAY_SHOW_INPUTS OVERLAY_SHOW_INPUT_PHYSICAL
#endif
#endif
#define DEFAULT_OVERLAY_SHOW_INPUTS_PORT 0

View File

@ -103,6 +103,14 @@ enum overlay_orientation
OVERLAY_ORIENTATION_PORTRAIT
};
enum overlay_show_input_type
{
OVERLAY_SHOW_INPUT_NONE = 0,
OVERLAY_SHOW_INPUT_TOUCHED,
OVERLAY_SHOW_INPUT_PHYSICAL,
OVERLAY_SHOW_INPUT_LAST
};
struct overlay
{
struct overlay_desc *descs;

View File

@ -180,7 +180,9 @@ GENERIC_DEFERRED_PUSH(deferred_push_cheat_search_settings_list, DISPLAYLIST_
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_display_settings_list, DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_views_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST)
#if defined(HAVE_OVERLAY)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_overlay_settings_list, DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST)
#endif
#ifdef HAVE_VIDEO_LAYOUT
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_video_layout_settings_list, DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST)
#endif
@ -706,7 +708,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST, deferred_push_onscreen_display_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, deferred_push_onscreen_notifications_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST, deferred_push_onscreen_notifications_views_settings_list},
#if defined(HAVE_OVERLAY)
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST, deferred_push_onscreen_overlay_settings_list},
#endif
#ifdef HAVE_VIDEO_LAYOUT
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST, deferred_push_onscreen_video_layout_settings_list},
#endif
@ -1232,9 +1236,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_onscreen_display_settings_list);
break;
#if defined(HAVE_OVERLAY)
case MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_onscreen_overlay_settings_list);
break;
#endif
#ifdef HAVE_VIDEO_LAYOUT
case MENU_ENUM_LABEL_DEFERRED_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_onscreen_video_layout_settings_list);

View File

@ -416,14 +416,6 @@ enum quit_on_close_content_type
QUIT_ON_CLOSE_CONTENT_LAST
};
enum overlay_show_input_type
{
OVERLAY_SHOW_INPUT_NONE = 0,
OVERLAY_SHOW_INPUT_TOUCHED,
OVERLAY_SHOW_INPUT_PHYSICAL,
OVERLAY_SHOW_INPUT_LAST
};
RETRO_END_DECLS
#endif

View File

@ -7933,6 +7933,7 @@ unsigned menu_displaylist_build_list(
}
}
break;
#if defined(HAVE_OVERLAY)
case DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST:
{
bool input_overlay_enable = settings->bools.input_overlay_enable;
@ -8019,6 +8020,7 @@ unsigned menu_displaylist_build_list(
}
}
break;
#endif
#ifdef HAVE_VIDEO_LAYOUT
case DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST:
{
@ -8563,7 +8565,9 @@ unsigned menu_displaylist_build_list(
case DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST:
{
menu_displaylist_build_info_t build_list[] = {
#if defined(HAVE_OVERLAY)
{MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS, PARSE_ACTION},
#endif
#ifdef HAVE_VIDEO_LAYOUT
{MENU_ENUM_LABEL_ONSCREEN_VIDEO_LAYOUT_SETTINGS, PARSE_ACTION},
#endif
@ -11311,7 +11315,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
case DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST:
case DISPLAYLIST_LATENCY_SETTINGS_LIST:
#if defined(HAVE_OVERLAY)
case DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST:
#endif
#ifdef HAVE_VIDEO_LAYOUT
case DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST:
#endif

View File

@ -178,7 +178,9 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_INPUT_MENU_SETTINGS_LIST,
DISPLAYLIST_LATENCY_SETTINGS_LIST,
DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST,
#if defined(HAVE_OVERLAY)
DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST,
#endif
DISPLAYLIST_AI_SERVICE_SETTINGS_LIST,
DISPLAYLIST_ACCESSIBILITY_SETTINGS_LIST,
#ifdef HAVE_VIDEO_LAYOUT

View File

@ -107,6 +107,10 @@
#include "../gfx/video_layout.h"
#endif
#if defined(HAVE_OVERLAY)
#include "../input/input_overlay.h"
#endif
/* Required for 3DS display mode setting */
#if defined(_3DS)
#include "gfx/common/ctr_common.h"
@ -5227,6 +5231,7 @@ static void setting_get_string_representation_uint_input_auto_game_focus(
}
}
#if defined(HAVE_OVERLAY)
static void setting_get_string_representation_uint_input_overlay_show_inputs(
rarch_setting_t *setting,
char *s, size_t len)
@ -5265,6 +5270,7 @@ static void setting_get_string_representation_uint_input_overlay_show_inputs_por
snprintf(s, len, "%u",
*setting->value.target.unsigned_integer + 1);
}
#endif
/* A protected driver is such that the user cannot set to "null" using the UI.
* Can prevent the user from locking him/herself out of the program. */
@ -13908,6 +13914,7 @@ static bool setting_append_list(
general_write_handler,
general_read_handler
);
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
(*list)[list_info->index - 1].action_left = &setting_uint_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_uint_action_right_with_refresh;

View File

@ -610,10 +610,10 @@ OverlayPage::OverlayPage(QObject *parent) :
QWidget *OverlayPage::widget()
{
QWidget *widget = new QWidget;
#if defined(HAVE_OVERLAY)
QVBoxLayout *layout = new QVBoxLayout;
CheckableSettingsGroup *overlayGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE);
CheckableSettingsGroup *inputsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS);
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED);
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_AUTO_ROTATE);
@ -621,9 +621,8 @@ QWidget *OverlayPage::widget()
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_WHEN_GAMEPAD_CONNECTED);
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR);
inputsGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT);
overlayGroup->addRow(inputsGroup);
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_INPUTS);
overlayGroup->add(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_INPUTS_PORT);
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_PRESET);
overlayGroup->add(MENU_ENUM_LABEL_OVERLAY_OPACITY);
@ -644,6 +643,7 @@ QWidget *OverlayPage::widget()
layout->addStretch();
widget->setLayout(layout);
#endif
return widget;
}