Able to compile without RPNG support

This commit is contained in:
twinaphex 2016-05-11 21:22:45 +02:00
parent 90d7722125
commit 4100bf95b4
5 changed files with 35 additions and 31 deletions

View File

@ -890,7 +890,6 @@ ifeq ($(HAVE_ZLIB), 1)
tasks/task_decompress.o
OBJ += $(ZLIB_OBJS)
DEFINES += -DHAVE_ZLIB
HAVE_RPNG = 1
HAVE_COMPRESSION = 1
ifeq ($(WANT_ZLIB), 1)
DEFINES += -DWANT_ZLIB
@ -900,11 +899,8 @@ ifeq ($(HAVE_ZLIB), 1)
endif
endif
ifdef HAVE_RPNG
DEFINES += -DHAVE_RPNG
endif
ifeq ($(HAVE_RPNG), 1)
DEFINES += -DHAVE_RPNG
OBJ += libretro-common/formats/png/rpng.o \
libretro-common/formats/png/rpng_encode.o
endif

View File

@ -1259,6 +1259,7 @@ static int action_ok_save_state(const char *path,
}
#ifdef HAVE_NETWORKING
#ifdef HAVE_ZLIB
static void cb_decompressed(void *task_data, void *user_data, const char *err)
{
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
@ -1289,6 +1290,7 @@ static void cb_decompressed(void *task_data, void *user_data, const char *err)
free(dec);
}
}
#endif
/* expects http_transfer_t*, menu_file_transfer_t* */
static void cb_generic_download(void *task_data,

View File

@ -425,10 +425,16 @@ if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH"
fi
fi
check_macro NEON __ARM_NEON__
add_define_make OS "$OS"
if [ "$HAVE_ZLIB" = 'no' ] && [ "HAVE_RPNG" != 'no' ]; then
HAVE_RPNG=no
echo "Notice: zlib is not available, RPNG will also be disabled."
fi
if [ "$HAVE_THREADS" = 'no' ] && [ "HAVE_CHEEVOS" != 'no' ]; then
HAVE_CHEEVOS=no
echo "Notice: Threads are not available, Cheevos will also be disabled."

View File

@ -77,3 +77,4 @@ HAVE_XSHM=no # XShm video driver support (disabled because it's ju
HAVE_CHEEVOS=yes # Retro Achievements
HAVE_VULKAN=auto # Vulkan support
C89_VULKAN=no
HAVE_RPNG=yes # RPNG support

View File

@ -163,7 +163,29 @@ static int cb_image_menu_thumbnail(void *data, size_t len)
return 0;
}
#ifdef HAVE_RPNG
static int rarch_main_data_image_iterate_process_transfer(nbio_handle_t *nbio)
{
unsigned i, width = 0, height = 0;
int retval = 0;
if (!nbio)
return -1;
for (i = 0; i < nbio->image.processing_pos_increment; i++)
{
retval = rarch_main_data_image_process(nbio,
&width, &height);
if (retval != IMAGE_PROCESS_NEXT)
break;
}
if (retval == IMAGE_PROCESS_NEXT)
return 0;
nbio->image.processing_final_state = retval;
return -1;
}
static int rarch_main_data_image_iterate_transfer(nbio_handle_t *nbio)
{
unsigned i;
@ -192,32 +214,10 @@ static int rarch_main_data_image_iterate_transfer(nbio_handle_t *nbio)
nbio->image.frame_count++;
return 0;
#ifdef HAVE_RPNG
error:
return -1;
}
static int rarch_main_data_image_iterate_process_transfer(nbio_handle_t *nbio)
{
unsigned i, width = 0, height = 0;
int retval = 0;
if (!nbio)
return -1;
for (i = 0; i < nbio->image.processing_pos_increment; i++)
{
retval = rarch_main_data_image_process(nbio,
&width, &height);
if (retval != IMAGE_PROCESS_NEXT)
break;
}
if (retval == IMAGE_PROCESS_NEXT)
return 0;
nbio->image.processing_final_state = retval;
return -1;
#endif
}
static void rarch_task_image_load_free_internal(nbio_handle_t *nbio)
@ -311,7 +311,6 @@ static int cb_nbio_image_menu_thumbnail(void *data, size_t len)
return cb_nbio_generic(nbio, &len);
}
#endif
bool rarch_task_image_load_handler(retro_task_t *task)
{