mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 05:43:34 +00:00
Split up input_overlay_load_overlay into two functions
This commit is contained in:
parent
9f40b65fca
commit
d349b2a37a
@ -321,19 +321,12 @@ end:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool input_overlay_load_overlay(input_overlay_t *ol,
|
static bool input_overlay_load_overlay_image(input_overlay_t *ol,
|
||||||
config_file_t *conf, const char *config_path,
|
config_file_t *conf, const char *config_path,
|
||||||
struct overlay *overlay, unsigned idx)
|
struct overlay *overlay, unsigned idx)
|
||||||
{
|
{
|
||||||
size_t i;
|
char overlay_path_key[64];
|
||||||
char overlay_path_key[64], overlay_name_key[64], overlay_rect_key[64];
|
|
||||||
char conf_key[64], overlay_full_screen_key[64], overlay_descs_key[64];
|
|
||||||
char overlay_rect[256];
|
|
||||||
char overlay_path[PATH_MAX_LENGTH], overlay_resolved_path[PATH_MAX_LENGTH];
|
char overlay_path[PATH_MAX_LENGTH], overlay_resolved_path[PATH_MAX_LENGTH];
|
||||||
unsigned descs = 0;
|
|
||||||
bool normalized = false;
|
|
||||||
float alpha_mod = 1.0f;
|
|
||||||
float range_mod = 1.0f;
|
|
||||||
|
|
||||||
snprintf(overlay_path_key, sizeof(overlay_path_key),
|
snprintf(overlay_path_key, sizeof(overlay_path_key),
|
||||||
"overlay%u_overlay", idx);
|
"overlay%u_overlay", idx);
|
||||||
@ -356,6 +349,25 @@ static bool input_overlay_load_overlay(input_overlay_t *ol,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool input_overlay_load_overlay(input_overlay_t *ol,
|
||||||
|
config_file_t *conf, const char *config_path,
|
||||||
|
struct overlay *overlay, unsigned idx)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
char overlay_path_key[64], overlay_name_key[64], overlay_rect_key[64];
|
||||||
|
char conf_key[64], overlay_full_screen_key[64], overlay_descs_key[64];
|
||||||
|
char overlay_rect[256];
|
||||||
|
unsigned descs = 0;
|
||||||
|
bool normalized = false;
|
||||||
|
float alpha_mod = 1.0f;
|
||||||
|
float range_mod = 1.0f;
|
||||||
|
|
||||||
|
snprintf(overlay_path_key, sizeof(overlay_path_key),
|
||||||
|
"overlay%u_overlay", idx);
|
||||||
|
|
||||||
snprintf(overlay_name_key, sizeof(overlay_name_key),
|
snprintf(overlay_name_key, sizeof(overlay_name_key),
|
||||||
"overlay%u_name", idx);
|
"overlay%u_name", idx);
|
||||||
config_get_array(conf, overlay_name_key,
|
config_get_array(conf, overlay_name_key,
|
||||||
@ -565,6 +577,13 @@ bool input_overlay_load_overlays_iterate(input_overlay_t *ol)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!input_overlay_load_overlay_image(ol, ol->conf,
|
||||||
|
ol->overlay_path, &ol->overlays[ol->pos], ol->pos))
|
||||||
|
{
|
||||||
|
RARCH_ERR("[Overlay]: Failed to load overlay image #%u.\n", (unsigned)ol->pos);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (!input_overlay_load_overlay(ol, ol->conf,
|
if (!input_overlay_load_overlay(ol, ol->conf,
|
||||||
ol->overlay_path, &ol->overlays[ol->pos], ol->pos))
|
ol->overlay_path, &ol->overlays[ol->pos], ol->pos))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user