mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-06 10:27:13 +00:00
Start getting rid of HAVE_SHADER_MANAGER ifdefs
This commit is contained in:
parent
7a3d7e784a
commit
7bc9e5260e
@ -48,7 +48,6 @@
|
||||
|
||||
extern struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END];
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int generic_shader_action_parameter_left(
|
||||
struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
@ -78,8 +77,6 @@ static int shader_action_parameter_left(unsigned type, const char *label, bool w
|
||||
return generic_shader_action_parameter_left(param, type, label, wraparound);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int action_left_cheat(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -229,7 +226,6 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
||||
static int action_left_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
unsigned current_scale, delta;
|
||||
unsigned pass = type -
|
||||
MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
||||
@ -245,14 +241,12 @@ static int action_left_shader_scale_pass(unsigned type, const char *label,
|
||||
shader_pass->fbo.valid = current_scale;
|
||||
shader_pass->fbo.scale_x = current_scale;
|
||||
shader_pass->fbo.scale_y = current_scale;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_filter_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
unsigned delta = 2;
|
||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(pass);
|
||||
@ -261,23 +255,18 @@ static int action_left_shader_filter_pass(unsigned type, const char *label,
|
||||
return menu_cbs_exit();
|
||||
|
||||
shader_pass->filter = ((shader_pass->filter + delta) % 3);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_left_shader_filter_default(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
rarch_setting_t *setting = menu_setting_find_enum(
|
||||
MENU_ENUM_LABEL_VIDEO_SMOOTH);
|
||||
if (!setting)
|
||||
return menu_cbs_exit();
|
||||
return menu_action_handle_setting(setting,
|
||||
setting_get_type(setting), MENU_ACTION_LEFT, wraparound);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int action_left_cheat_num_passes(unsigned type, const char *label,
|
||||
@ -298,7 +287,6 @@ static int action_left_cheat_num_passes(unsigned type, const char *label,
|
||||
static int action_left_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
bool refresh = false;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
|
||||
@ -312,7 +300,6 @@ static int action_left_shader_num_passes(unsigned type, const char *label,
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
video_shader_resolve_parameters(NULL, shader);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -599,7 +586,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, action_left_cheat);
|
||||
}
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -610,7 +596,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, shader_action_parameter_left);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -1139,7 +1139,6 @@ static int generic_action_ok(const char *path,
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
case ACTION_OK_LOAD_PRESET:
|
||||
{
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
@ -1160,7 +1159,6 @@ static int generic_action_ok(const char *path,
|
||||
video_shader_resolve_parameters(NULL, menu_shader_get());
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case ACTION_OK_LOAD_RECORD_CONFIGFILE:
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
@ -2978,9 +2976,7 @@ end:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
extern size_t hack_shader_pass;
|
||||
#endif
|
||||
|
||||
#define default_action_ok_func(func_name, lbl) \
|
||||
int (func_name)(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) \
|
||||
|
@ -50,7 +50,6 @@
|
||||
|
||||
extern struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END];
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int generic_shader_action_parameter_right(struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
{
|
||||
@ -80,7 +79,6 @@ int shader_action_parameter_right(unsigned type, const char *label, bool wraparo
|
||||
return menu_cbs_exit();
|
||||
return generic_shader_action_parameter_right(param, type, label, wraparound);
|
||||
}
|
||||
#endif
|
||||
|
||||
int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -238,7 +236,6 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
||||
static int action_right_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
unsigned current_scale, delta;
|
||||
unsigned pass =
|
||||
type - MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
||||
@ -253,14 +250,12 @@ static int action_right_shader_scale_pass(unsigned type, const char *label,
|
||||
|
||||
shader_pass->fbo.valid = current_scale;
|
||||
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = current_scale;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_filter_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||
unsigned delta = 1;
|
||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(pass);
|
||||
@ -269,23 +264,18 @@ static int action_right_shader_filter_pass(unsigned type, const char *label,
|
||||
return menu_cbs_exit();
|
||||
|
||||
shader_pass->filter = ((shader_pass->filter + delta) % 3);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_right_shader_filter_default(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_VIDEO_SMOOTH);
|
||||
if (!setting)
|
||||
return menu_cbs_exit();
|
||||
return menu_action_handle_setting(setting,
|
||||
setting_get_type(setting), MENU_ACTION_RIGHT,
|
||||
wraparound);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int action_right_cheat_num_passes(unsigned type, const char *label,
|
||||
@ -305,7 +295,6 @@ static int action_right_cheat_num_passes(unsigned type, const char *label,
|
||||
static int action_right_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
bool refresh = false;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
|
||||
@ -319,7 +308,6 @@ static int action_right_shader_num_passes(unsigned type, const char *label,
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||
video_shader_resolve_parameters(NULL, shader);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -467,7 +455,6 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, action_right_cheat);
|
||||
}
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -478,7 +465,6 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, shader_action_parameter_right);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -122,7 +122,6 @@ static int action_select_core_setting(const char *path, const char *label, unsig
|
||||
return core_setting_right(type, label, true);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int shader_action_parameter_select(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
@ -134,7 +133,6 @@ static int shader_action_parameter_preset_select(const char *path, const char *l
|
||||
{
|
||||
return shader_action_parameter_right(type, label, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_select_cheat(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
@ -210,7 +208,6 @@ static int menu_cbs_init_bind_select_compare_type(
|
||||
{
|
||||
BIND_ACTION_SELECT(cbs, action_select_cheat);
|
||||
}
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -221,7 +218,6 @@ static int menu_cbs_init_bind_select_compare_type(
|
||||
{
|
||||
BIND_ACTION_SELECT(cbs, shader_action_parameter_preset_select);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -117,9 +117,9 @@ static int action_start_input_desc(unsigned type, const char *label)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_start_shader_action_parameter(unsigned type, const char *label)
|
||||
static int action_start_shader_action_parameter(
|
||||
unsigned type, const char *label)
|
||||
{
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
video_shader_ctx_t shader_info;
|
||||
struct video_shader_parameter *param = NULL;
|
||||
unsigned parameter = type - MENU_SETTINGS_SHADER_PARAMETER_0;
|
||||
@ -135,9 +135,6 @@ static int action_start_shader_action_parameter(unsigned type, const char *label
|
||||
param->current = MIN(MAX(param->minimum, param->current), param->maximum);
|
||||
|
||||
return menu_shader_manager_clear_parameter(parameter);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int action_start_shader_pass(unsigned type, const char *label)
|
||||
|
@ -2017,7 +2017,6 @@ static int menu_database_parse_query(file_list_t *list, const char *path,
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int deferred_push_video_shader_parameters_common(
|
||||
menu_displaylist_info_t *info,
|
||||
struct video_shader *shader, unsigned base_parameter)
|
||||
@ -2042,7 +2041,6 @@ static int deferred_push_video_shader_parameters_common(
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int menu_displaylist_parse_settings_internal(void *data,
|
||||
menu_displaylist_info_t *info,
|
||||
@ -6241,7 +6239,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_SHADER_PARAMETERS:
|
||||
case DISPLAYLIST_SHADER_PARAMETERS_PRESET:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
{
|
||||
video_shader_ctx_t shader_info;
|
||||
video_shader_driver_get_current_shader(&shader_info);
|
||||
@ -6265,7 +6262,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
|
||||
info->need_push = true;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case DISPLAYLIST_PERFCOUNTERS_CORE:
|
||||
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
|
||||
|
Loading…
x
Reference in New Issue
Block a user