(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
1 changed files with 3 additions and 4 deletions

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, static bool input_overlay_load_texture_image(struct overlay *overlay,
struct texture_image *image, const char *path) struct texture_image *image, const char *path)
{ {
struct texture_image img = {0}; if (!image)
return false;
if (!texture_image_load(&img, path)) if (!texture_image_load(image, path))
return false; return false;
*image = img;
overlay->load_images[overlay->load_images_size++] = *image; overlay->load_images[overlay->load_images_size++] = *image;
return true; return true;