mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-23 11:12:33 +00:00
Make RBMP optional too
This commit is contained in:
parent
c369a00a3e
commit
9b572d0fe4
@ -909,6 +909,11 @@ ifeq ($(HAVE_ZLIB), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
DEFINES += -DHAVE_RTGA
|
||||
OBJ += libretro-common/formats/tga/rtga.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RPNG), 1)
|
||||
DEFINES += -DHAVE_RPNG
|
||||
OBJ += libretro-common/formats/png/rpng.o \
|
||||
@ -920,16 +925,15 @@ ifeq ($(HAVE_RJPEG), 1)
|
||||
OBJ += libretro-common/formats/jpeg/rjpeg.o
|
||||
endif
|
||||
|
||||
OBJ += \
|
||||
libretro-common/formats/bmp/rbmp.o \
|
||||
libretro-common/formats/bmp/rbmp_encode.o \
|
||||
ifeq ($(HAVE_RBMP), 1)
|
||||
DEFINES += -DHAVE_RBMP
|
||||
OBJ += libretro-common/formats/bmp/rbmp.o
|
||||
endif
|
||||
|
||||
OBJ += libretro-common/formats/bmp/rbmp_encode.o \
|
||||
libretro-common/formats/json/jsonsax.o \
|
||||
libretro-common/formats/image_transfer.o
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
OBJ += libretro-common/formats/tga/rtga.o
|
||||
endif
|
||||
|
||||
ifdef HAVE_COMPRESSION
|
||||
DEFINES += -DHAVE_COMPRESSION
|
||||
endif
|
||||
|
@ -244,7 +244,9 @@ VIDEO IMAGE
|
||||
#ifdef HAVE_RJPEG
|
||||
#include "../libretro-common/formats/jpeg/rjpeg.c"
|
||||
#endif
|
||||
#ifdef HAVE_RBMP
|
||||
#include "../libretro-common/formats/bmp/rbmp.c"
|
||||
#endif
|
||||
#include "../libretro-common/formats/bmp/rbmp_encode.c"
|
||||
|
||||
/*============================================================
|
||||
|
@ -236,8 +236,10 @@ static enum video_image_format image_texture_get_type(const char *path)
|
||||
if (strstr(path, ".jpg") || strstr(path, ".jpeg"))
|
||||
return IMAGE_FORMAT_JPEG;
|
||||
#endif
|
||||
#ifdef HAVE_RBMP
|
||||
if (strstr(path, ".bmp"))
|
||||
return IMAGE_FORMAT_BMP;
|
||||
#endif
|
||||
return IMAGE_FORMAT_NONE;
|
||||
}
|
||||
|
||||
@ -253,8 +255,10 @@ static enum image_type_enum image_texture_convert_fmt_to_type(enum video_image_f
|
||||
case IMAGE_FORMAT_JPEG:
|
||||
return IMAGE_TYPE_JPEG;
|
||||
#endif
|
||||
#ifdef HAVE_RBMP
|
||||
case IMAGE_FORMAT_BMP:
|
||||
return IMAGE_TYPE_BMP;
|
||||
#endif
|
||||
#ifdef HAVE_RTGA
|
||||
case IMAGE_FORMAT_TGA:
|
||||
return IMAGE_TYPE_TGA;
|
||||
|
@ -33,7 +33,9 @@
|
||||
#ifdef HAVE_RTGA
|
||||
#include <formats/rtga.h>
|
||||
#endif
|
||||
#ifdef HAVE_RBMP
|
||||
#include <formats/rbmp.h>
|
||||
#endif
|
||||
|
||||
#include <formats/image.h>
|
||||
|
||||
@ -57,7 +59,9 @@ void image_transfer_free(void *data, enum image_type_enum type)
|
||||
#endif
|
||||
break;
|
||||
case IMAGE_TYPE_BMP:
|
||||
#ifdef HAVE_RBMP
|
||||
rbmp_free((rbmp_t*)data);
|
||||
#endif
|
||||
break;
|
||||
case IMAGE_TYPE_NONE:
|
||||
break;
|
||||
@ -81,7 +85,11 @@ void *image_transfer_new(enum image_type_enum type)
|
||||
break;
|
||||
#endif
|
||||
case IMAGE_TYPE_BMP:
|
||||
#ifdef HAVE_RBMP
|
||||
return rbmp_alloc();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -177,7 +185,9 @@ void image_transfer_set_buffer_ptr(
|
||||
#endif
|
||||
break;
|
||||
case IMAGE_TYPE_BMP:
|
||||
#ifdef HAVE_RBMP
|
||||
rbmp_set_buf_ptr((rbmp_t*)data, (uint8_t*)ptr);
|
||||
#endif
|
||||
break;
|
||||
case IMAGE_TYPE_NONE:
|
||||
break;
|
||||
@ -218,8 +228,12 @@ int image_transfer_process(
|
||||
break;
|
||||
#endif
|
||||
case IMAGE_TYPE_BMP:
|
||||
#ifdef HAVE_RBMP
|
||||
return rbmp_process_image((rbmp_t*)data,
|
||||
(void**)buf, len, width, height);
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case IMAGE_TYPE_NONE:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user