Skip to content

Commit a56a8d9

Browse files
authored
omit VIDEO_FILTER_TOGGLE hotkey check in menu (#19039)
* input_driver: rm video_filter_toggle in menu Update runloop.c * correct indents from prv commits * msg_hash: correct video_filter spelling * menu: place video_filter_enable labels in macros
1 parent 67ade86 commit a56a8d9

8 files changed

Lines changed: 24 additions & 12 deletions

File tree

gfx/video_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3314,7 +3314,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
33143314
video_info->preemptive_frames = settings->bools.preemptive_frames_enable;
33153315
video_info->runahead_frames = settings->uints.run_ahead_frames;
33163316
video_info->fps_show = settings->bools.video_fps_show;
3317-
video_info->filter_enable = settings->bools.video_filter_enable;
3317+
video_info->filter_enable = settings->bools.video_filter_enable;
33183318
video_info->memory_show = settings->bools.video_memory_show;
33193319
video_info->statistics_show = settings->bools.video_statistics_show;
33203320
video_info->framecount_show = settings->bools.video_framecount_show;

input/input_driver.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8022,15 +8022,13 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
80228022
{0, RARCH_UI_COMPANION_TOGGLE },
80238023
{0, RARCH_FPS_TOGGLE },
80248024
{0, RARCH_NETPLAY_HOST_TOGGLE },
8025-
{0, RARCH_VIDEO_FILTER_TOGGLE },
80268025
};
80278026

80288027
ids[14][0] = input_config_binds[0][RARCH_QUIT_KEY].key;
80298028
ids[15][0] = input_config_binds[0][RARCH_FULLSCREEN_TOGGLE_KEY].key;
80308029
ids[16][0] = input_config_binds[0][RARCH_UI_COMPANION_TOGGLE].key;
80318030
ids[17][0] = input_config_binds[0][RARCH_FPS_TOGGLE].key;
80328031
ids[18][0] = input_config_binds[0][RARCH_NETPLAY_HOST_TOGGLE].key;
8033-
ids[19][0] = input_config_binds[0][RARCH_VIDEO_FILTER_TOGGLE].key;
80348032

80358033
if (settings->bools.input_menu_swap_ok_cancel_buttons)
80368034
{

intl/msg_hash_us.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4141,7 +4141,7 @@ MSG_HASH(
41414141
)
41424142
MSG_HASH(
41434143
MENU_ENUM_SUBLABEL_INPUT_META_VIDEO_FILTER_TOGGLE,
4144-
"Switches software 'Vide Filter' on/off."
4144+
"Switches software 'Video Filter' on/off."
41454145
)
41464146
MSG_HASH(
41474147
MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE,

menu/cbs/menu_cbs_sublabel.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_hdr_settings_list, M
360360
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_output_settings_list, MENU_ENUM_SUBLABEL_VIDEO_OUTPUT_SETTINGS)
361361
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_crt_switchres_settings_list, MENU_ENUM_SUBLABEL_CRT_SWITCHRES_SETTINGS)
362362
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_suspend_screensaver_enable, MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE)
363-
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_filter_enable, MENU_ENUM_SUBLABEL_VIDEO_FILTER_ENABLE)
363+
#ifdef HAVE_VIDEO_FILTER
364+
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_filter_enable, MENU_ENUM_SUBLABEL_VIDEO_FILTER_ENABLE)
365+
#endif
364366
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_scale, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE)
365367
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_opacity, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_OPACITY)
366368
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_window_show_decorations, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SHOW_DECORATIONS)
@@ -487,7 +489,9 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_ui_companion_toggle, ME
487489
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_vrr_runloop_toggle, MENU_ENUM_SUBLABEL_INPUT_META_VRR_RUNLOOP_TOGGLE)
488490
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_runahead_toggle, MENU_ENUM_SUBLABEL_INPUT_META_RUNAHEAD_TOGGLE)
489491
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_preempt_toggle, MENU_ENUM_SUBLABEL_INPUT_META_PREEMPT_TOGGLE)
492+
#ifdef HAVE_VIDEO_FILTER
490493
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_video_filter_toggle, MENU_ENUM_SUBLABEL_INPUT_META_VIDEO_FILTER_TOGGLE)
494+
#endif
491495
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_fps_toggle, MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE)
492496
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_statistics_toggle, MENU_ENUM_SUBLABEL_INPUT_META_STATISTICS_TOGGLE)
493497
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_ai_service, MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE)
@@ -2442,9 +2446,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
24422446
case RARCH_PREEMPT_TOGGLE:
24432447
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_preempt_toggle);
24442448
return 0;
2449+
#ifdef HAVE_VIDEO_FILTER
24452450
case RARCH_VIDEO_FILTER_TOGGLE:
24462451
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_video_filter_toggle);
24472452
return 0;
2453+
#endif
24482454
case RARCH_FPS_TOGGLE:
24492455
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_fps_toggle);
24502456
return 0;
@@ -5500,9 +5506,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
55005506
case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE:
55015507
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_suspend_screensaver_enable);
55025508
break;
5509+
#ifdef HAVE_VIDEO_FILTER
55035510
case MENU_ENUM_LABEL_VIDEO_FILTER_ENABLE:
55045511
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_filter_enable);
55055512
break;
5513+
#endif
55065514
case MENU_ENUM_LABEL_VIDEO_SCALE:
55075515
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_window_scale);
55085516
break;

menu/menu_displaylist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8118,10 +8118,12 @@ unsigned menu_displaylist_build_list(
81188118
MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE,
81198119
PARSE_ONLY_BOOL, false) == 0)
81208120
count++;
8121+
#ifdef HAVE_VIDEO_FILTER
81218122
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
81228123
MENU_ENUM_LABEL_VIDEO_FILTER_ENABLE,
81238124
PARSE_ONLY_BOOL, false) == 0)
81248125
count++;
8126+
#endif
81258127
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
81268128
MENU_ENUM_LABEL_BRIGHTNESS_CONTROL,
81278129
PARSE_ONLY_UINT, false) == 0)

retroarch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,10 +3187,10 @@ bool command_event(enum event_command cmd, void *data)
31873187
case CMD_EVENT_VIDEO_FILTER_INIT:
31883188
{
31893189
#ifdef HAVE_VIDEO_FILTER
3190-
const enum retro_pixel_format
3191-
video_driver_pix_fmt = video_st->pix_fmt;
3192-
settings_t *settings = config_get_ptr();
3193-
video_driver_init_filter(video_driver_pix_fmt, settings);
3190+
const enum retro_pixel_format
3191+
video_driver_pix_fmt = video_st->pix_fmt;
3192+
settings_t *settings = config_get_ptr();
3193+
video_driver_init_filter(video_driver_pix_fmt, settings);
31943194
#endif
31953195
break;
31963196
}

runloop.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6521,9 +6521,6 @@ static enum runloop_state_enum runloop_check_state(
65216521
/* Check UI companion hotkey */
65226522
HOTKEY_CHECK(RARCH_UI_COMPANION_TOGGLE, CMD_EVENT_UI_COMPANION_TOGGLE, true, NULL);
65236523

6524-
/* Check Video Filter hotkey */
6525-
HOTKEY_CHECK(RARCH_VIDEO_FILTER_TOGGLE, CMD_VIDEO_FILTER_TOGGLE, true, NULL);
6526-
65276524
/* Check FPS hotkey */
65286525
HOTKEY_CHECK(RARCH_FPS_TOGGLE, CMD_EVENT_FPS_TOGGLE, true, NULL);
65296526

@@ -7228,6 +7225,11 @@ static enum runloop_state_enum runloop_check_state(
72287225
RARCH_CHEAT_INDEX_MINUS, CMD_EVENT_CHEAT_INDEX_MINUS,
72297226
RARCH_CHEAT_TOGGLE, CMD_EVENT_CHEAT_TOGGLE);
72307227

7228+
#ifdef HAVE_VIDEO_FILTER
7229+
/* Check Video Filter hotkey */
7230+
HOTKEY_CHECK(RARCH_VIDEO_FILTER_TOGGLE, CMD_VIDEO_FILTER_TOGGLE, true, NULL);
7231+
#endif
7232+
72317233
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
72327234
/* Check shader hotkeys */
72337235
HOTKEY_CHECK3(

ui/drivers/ui_qt_widgets.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6850,7 +6850,9 @@ QWidget *VideoPage::widget()
68506850
syncGroup->add(MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE);
68516851

68526852
miscGroup->add(MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE);
6853+
#ifdef HAVE_VIDEO_FILTER
68536854
miscGroup->add(MENU_ENUM_LABEL_VIDEO_FILTER_ENABLE);
6855+
#endif
68546856
miscGroup->add(MENU_ENUM_LABEL_VIDEO_THREADED);
68556857
miscGroup->add(MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT);
68566858
miscGroup->add(MENU_ENUM_LABEL_VIDEO_SMOOTH);

0 commit comments

Comments
 (0)