(input_overlay.c) Attemp to simplify input_overlay_load_texture_image

This commit is contained in:
twinaphex 2015-07-11 22:03:21 +02:00
parent 5fd65afae1
commit 17024c4056

View File

@ -307,12 +307,11 @@ static void input_overlay_free_overlays(input_overlay_t *ol)
static bool input_overlay_load_texture_image(struct overlay *overlay,
struct texture_image *image, const char *path)
{
struct texture_image img = {0};
if (!texture_image_load(&img, path))
if (!image)
return false;
if (!texture_image_load(image, path))
return false;
*image = img;
overlay->load_images[overlay->load_images_size++] = *image;
return true;