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