mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-20 01:22:16 +00:00
Revert "allow saving and properly loading 0 pass shader presets"
This reverts commit b54a360ab8b584a5350a125c00e605960a26297b.
This commit is contained in:
parent
184dc79011
commit
6514b80ff2
@ -738,6 +738,12 @@ bool video_shader_read_conf_preset(config_file_t *conf,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!shaders)
|
||||
{
|
||||
RARCH_ERR("Need to define at least 1 shader.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!config_get_int(conf, "feedback_pass",
|
||||
&shader->feedback_pass))
|
||||
shader->feedback_pass = -1;
|
||||
|
@ -451,7 +451,7 @@ void menu_shader_manager_clear_pass_path(unsigned i)
|
||||
**/
|
||||
unsigned menu_shader_manager_get_type(const void *data)
|
||||
{
|
||||
enum rarch_shader_type type;
|
||||
unsigned type = RARCH_SHADER_NONE;
|
||||
const struct video_shader *shader = (const struct video_shader*)data;
|
||||
/* All shader types must be the same, or we cannot use it. */
|
||||
uint8_t i = 0;
|
||||
@ -459,9 +459,6 @@ unsigned menu_shader_manager_get_type(const void *data)
|
||||
if (!shader)
|
||||
return RARCH_SHADER_NONE;
|
||||
|
||||
type = video_shader_parse_type(shader->path,
|
||||
RARCH_SHADER_NONE);
|
||||
|
||||
for (i = 0; i < shader->passes; i++)
|
||||
{
|
||||
enum rarch_shader_type pass_type =
|
||||
@ -473,7 +470,9 @@ unsigned menu_shader_manager_get_type(const void *data)
|
||||
case RARCH_SHADER_CG:
|
||||
case RARCH_SHADER_GLSL:
|
||||
case RARCH_SHADER_SLANG:
|
||||
if (type != pass_type)
|
||||
if (type == RARCH_SHADER_NONE)
|
||||
type = pass_type;
|
||||
else if (type != pass_type)
|
||||
return RARCH_SHADER_NONE;
|
||||
break;
|
||||
default:
|
||||
@ -499,7 +498,7 @@ void menu_shader_manager_apply_changes(void)
|
||||
|
||||
shader_type = menu_shader_manager_get_type(shader);
|
||||
|
||||
if (shader_type != RARCH_SHADER_NONE)
|
||||
if (shader->passes && shader_type != RARCH_SHADER_NONE)
|
||||
{
|
||||
menu_shader_manager_save_preset(NULL, true, false);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user