Fix crash when only scale_type_x/y were used.
This commit is contained in:
parent
70dbebcb5e
commit
79d508b05a
|
@ -805,6 +805,8 @@ static bool load_shader_params(unsigned i, config_file_t *conf)
|
|||
scale->abs_x = geom->base_width;
|
||||
scale->abs_y = geom->base_height;
|
||||
|
||||
if (scale_type_x)
|
||||
{
|
||||
if (strcmp(scale_type_x, "source") == 0)
|
||||
scale->type_x = RARCH_SCALE_INPUT;
|
||||
else if (strcmp(scale_type_x, "viewport") == 0)
|
||||
|
@ -817,7 +819,10 @@ static bool load_shader_params(unsigned i, config_file_t *conf)
|
|||
ret = false;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (scale_type_y)
|
||||
{
|
||||
if (strcmp(scale_type_y, "source") == 0)
|
||||
scale->type_y = RARCH_SCALE_INPUT;
|
||||
else if (strcmp(scale_type_y, "viewport") == 0)
|
||||
|
@ -830,6 +835,7 @@ static bool load_shader_params(unsigned i, config_file_t *conf)
|
|||
ret = false;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (scale->type_x == RARCH_SCALE_ABSOLUTE)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue