Add HAVE_RTGA switch

This commit is contained in:
twinaphex 2016-05-11 21:57:41 +02:00
parent 367150b487
commit 670b564f13
4 changed files with 11 additions and 1 deletions

View File

@ -911,9 +911,12 @@ ifeq ($(HAVE_RJPEG), 1)
endif
OBJ += libretro-common/formats/bmp/rbmp_encode.o \
libretro-common/formats/tga/rtga.o \
libretro-common/formats/json/jsonsax.o
ifeq ($(HAVE_RTGA), 1)
OBJ += libretro-common/formats/tga/rtga.o
endif
ifdef HAVE_COMPRESSION
DEFINES += -DHAVE_COMPRESSION
endif

View File

@ -32,7 +32,9 @@
#ifdef HAVE_RJPEG
#include <formats/rjpeg.h>
#endif
#ifdef HAVE_RTGA
#include <formats/tga.h>
#endif
#include "../general.h"
@ -266,9 +268,11 @@ bool video_texture_image_load(struct texture_image *out_img,
switch (fmt)
{
case IMAGE_FORMAT_TGA:
#ifdef HAVE_RTGA
if (rtga_image_load_shift((uint8_t*)ptr, out_img,
a_shift, r_shift, g_shift, b_shift))
goto success;
#endif
break;
case IMAGE_FORMAT_PNG:
#ifdef HAVE_RPNG

View File

@ -222,7 +222,9 @@ VIDEO IMAGE
#include "../gfx/video_texture_image.c"
#ifdef HAVE_RTGA
#include "../libretro-common/formats/tga/rtga.c"
#endif
#ifdef HAVE_IMAGEVIEWER
#include "../cores/libretro-imageviewer/image_core.c"

View File

@ -79,3 +79,4 @@ HAVE_VULKAN=auto # Vulkan support
C89_VULKAN=no
HAVE_RPNG=yes # RPNG support
HAVE_RJPEG=yes # RJPEG support
HAVE_RTGA=yes # RTGA support