mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Revert "Get rid of a ton of HAVE_SHADER_MANAGER ifdefs"
This reverts commit c4f7111aa3569c0067824aaae4efdaef3e467d52.
This commit is contained in:
parent
c4f7111aa3
commit
4dd3d897dc
@ -46,6 +46,7 @@
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int generic_shader_action_parameter_left(
|
||||
struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
@ -83,6 +84,7 @@ static int shader_action_parameter_preset_left(unsigned type,
|
||||
return generic_shader_action_parameter_left(param,
|
||||
type, label, wraparound);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_left_cheat(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -203,6 +205,7 @@ 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;
|
||||
@ -218,12 +221,14 @@ 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);
|
||||
@ -232,18 +237,23 @@ 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,
|
||||
@ -264,6 +274,7 @@ 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();
|
||||
|
||||
@ -277,6 +288,7 @@ 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;
|
||||
}
|
||||
|
||||
@ -509,6 +521,7 @@ 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)
|
||||
{
|
||||
@ -519,6 +532,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, shader_action_parameter_preset_left);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -47,6 +47,7 @@
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
static int generic_shader_action_parameter_right(struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
{
|
||||
@ -80,6 +81,7 @@ int shader_action_parameter_preset_right(unsigned type, const char *label,
|
||||
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)
|
||||
@ -206,6 +208,7 @@ 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;
|
||||
@ -220,33 +223,39 @@ 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)
|
||||
{
|
||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||
unsigned delta = 1;
|
||||
struct video_shader_pass
|
||||
*shader_pass = menu_shader_manager_get_pass(pass);
|
||||
#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);
|
||||
|
||||
if (!shader_pass)
|
||||
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,
|
||||
@ -266,6 +275,7 @@ 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();
|
||||
|
||||
@ -279,6 +289,7 @@ 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;
|
||||
}
|
||||
|
||||
@ -380,6 +391,7 @@ 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)
|
||||
{
|
||||
@ -390,6 +402,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, shader_action_parameter_preset_right);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user