Skip to content

Commit

Permalink
Fix overlay reach_x/y regression
Browse files Browse the repository at this point in the history
  • Loading branch information
neil4 authored and LibretroAdmin committed Jul 1, 2023
1 parent 224bac2 commit dd18152
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasks/task_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,17 @@ static bool task_overlay_load_desc(
_len = strlcpy(conf_key, overlay_desc_key, sizeof(conf_key));

strlcpy(conf_key + _len, "_reach_x", sizeof(conf_key) - _len);
desc->reach_right = 1.0f;
desc->reach_left = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
{
desc->reach_right = tmp_float;
desc->reach_left = tmp_float;
}

strlcpy(conf_key + _len, "_reach_y", sizeof(conf_key) - _len);
desc->reach_up = 1.0f;
desc->reach_down = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
{
desc->reach_up = tmp_float;
Expand All @@ -419,7 +423,6 @@ static bool task_overlay_load_desc(
desc->flags |= OVERLAY_DESC_MOVABLE;

strlcpy(conf_key + _len, "_reach_up", sizeof(conf_key) - _len);
desc->reach_up = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
desc->reach_up = tmp_float;

Expand All @@ -440,17 +443,14 @@ static bool task_overlay_load_desc(
desc->flags |= OVERLAY_DESC_EXCLUSIVE;

strlcpy(conf_key + _len, "_reach_down", sizeof(conf_key) - _len);
desc->reach_down = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
desc->reach_down = tmp_float;

strlcpy(conf_key + _len, "_reach_left", sizeof(conf_key) - _len);
desc->reach_left = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
desc->reach_left = tmp_float;

strlcpy(conf_key + _len, "_reach_right", sizeof(conf_key) - _len);
desc->reach_right = 1.0f;
if (config_get_float(conf, conf_key, &tmp_float))
desc->reach_right = tmp_float;

Expand Down

0 comments on commit dd18152

Please sign in to comment.