(input_overlay.c) Attemp to simplify input_overlay_load_texture_image
This commit is contained in:
parent
5fd65afae1
commit
17024c4056
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue