mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
More cleanups
This commit is contained in:
parent
5e3c2f3f63
commit
a5ad63b577
@ -240,14 +240,8 @@ static int action_left_shader_filter_pass(unsigned type, const char *label,
|
|||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
unsigned delta = 2;
|
unsigned delta = 2;
|
||||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||||
struct video_shader *shader = NULL;
|
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(pass);
|
||||||
struct video_shader_pass *shader_pass = NULL;
|
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
|
||||||
&shader);
|
|
||||||
if (!shader)
|
|
||||||
return menu_cbs_exit();
|
|
||||||
shader_pass = &shader->pass[pass];
|
|
||||||
if (!shader_pass)
|
if (!shader_pass)
|
||||||
return menu_cbs_exit();
|
return menu_cbs_exit();
|
||||||
|
|
||||||
|
@ -231,27 +231,20 @@ static int action_right_shader_scale_pass(unsigned type, const char *label,
|
|||||||
bool wraparound)
|
bool wraparound)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
unsigned current_scale, delta;
|
||||||
struct video_shader *shader = NULL;
|
unsigned pass =
|
||||||
struct video_shader_pass *shader_pass = NULL;
|
type - MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
||||||
|
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(pass);
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
|
||||||
&shader);
|
|
||||||
if (!shader)
|
|
||||||
return menu_cbs_exit();
|
|
||||||
shader_pass = &shader->pass[pass];
|
|
||||||
if (!shader_pass)
|
if (!shader_pass)
|
||||||
return menu_cbs_exit();
|
return menu_cbs_exit();
|
||||||
|
|
||||||
{
|
current_scale = shader_pass->fbo.scale_x;
|
||||||
unsigned current_scale = shader_pass->fbo.scale_x;
|
delta = 1;
|
||||||
unsigned delta = 1;
|
current_scale = (current_scale + delta) % 6;
|
||||||
current_scale = (current_scale + delta) % 6;
|
|
||||||
|
|
||||||
shader_pass->fbo.valid = current_scale;
|
shader_pass->fbo.valid = current_scale;
|
||||||
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = current_scale;
|
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = current_scale;
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -262,14 +255,8 @@ static int action_right_shader_filter_pass(unsigned type, const char *label,
|
|||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||||
unsigned delta = 1;
|
unsigned delta = 1;
|
||||||
struct video_shader *shader = NULL;
|
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(pass);
|
||||||
struct video_shader_pass *shader_pass = NULL;
|
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
|
||||||
&shader);
|
|
||||||
if (!shader)
|
|
||||||
return menu_cbs_exit();
|
|
||||||
shader_pass = &shader->pass[pass];
|
|
||||||
if (!shader_pass)
|
if (!shader_pass)
|
||||||
return menu_cbs_exit();
|
return menu_cbs_exit();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user