diff --git a/cores/libretro-imageviewer/image_core.c b/cores/libretro-imageviewer/image_core.c index 831c120af0..7109b3c5ca 100644 --- a/cores/libretro-imageviewer/image_core.c +++ b/cores/libretro-imageviewer/image_core.c @@ -72,7 +72,7 @@ static struct string_list *image_file_list; static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|psd|tga|gif|hdr|pic|ppm|pgm"; #else -static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */ +static const char image_formats[] = #ifdef HAVE_RJPEG "|jpg|jpeg" @@ -95,6 +95,9 @@ static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the fir #endif ; +/* to remove the first |, the alternative is 25 extra lines of ifdef/etc */ +static const char* IMAGE_CORE_PREFIX(valid_extensions) = image_formats + 1; + #endif void IMAGE_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)