(Overlay) Refactor input_overlay_load_desc_image

This commit is contained in:
twinaphex 2015-04-13 20:02:06 +02:00
parent 79c93b444d
commit 090fddcdbe
1 changed files with 5 additions and 16 deletions

View File

@ -164,12 +164,9 @@ static bool input_overlay_load_texture_image(struct overlay *overlay,
static bool input_overlay_load_desc_image(input_overlay_t *ol, static bool input_overlay_load_desc_image(input_overlay_t *ol,
struct overlay_desc *desc, struct overlay_desc *desc,
struct overlay *input_overlay, struct overlay *input_overlay,
unsigned ol_idx, unsigned desc_idx, unsigned ol_idx, unsigned desc_idx)
unsigned width, unsigned height,
bool normalized, float alpha_mod, float range_mod)
{ {
char overlay_desc_image_key[64], image_path[PATH_MAX_LENGTH]; char overlay_desc_image_key[64], image_path[PATH_MAX_LENGTH];
bool ret = true;
snprintf(overlay_desc_image_key, sizeof(overlay_desc_image_key), snprintf(overlay_desc_image_key, sizeof(overlay_desc_image_key),
"overlay%u_desc%u_overlay", ol_idx, desc_idx); "overlay%u_desc%u_overlay", ol_idx, desc_idx);
@ -187,7 +184,7 @@ static bool input_overlay_load_desc_image(input_overlay_t *ol,
input_overlay->pos ++; input_overlay->pos ++;
return ret; return true;
} }
static bool input_overlay_load_desc(input_overlay_t *ol, static bool input_overlay_load_desc(input_overlay_t *ol,
@ -511,17 +508,9 @@ bool input_overlay_load_overlays_iterate(input_overlay_t *ol)
{ {
if (overlay->pos < overlay->size) if (overlay->pos < overlay->size)
{ {
if (!input_overlay_load_desc_image(ol, &overlay->descs[overlay->pos], overlay, input_overlay_load_desc_image(ol,
ol->pos, overlay->pos, &overlay->descs[overlay->pos], overlay,
overlay->image.width, overlay->image.height, ol->pos, overlay->pos);
overlay->config.normalized,
overlay->config.alpha_mod, overlay->config.range_mod))
{
RARCH_ERR("[Overlay]: Failed to load overlay desc images for overlay #%u.\n",
(unsigned)overlay->pos);
goto error;
}
} }
else else
{ {