diff --git a/deps/libFLAC/format.c b/deps/libFLAC/format.c index 213f0c82f5..40ec70fb95 100644 --- a/deps/libFLAC/format.c +++ b/deps/libFLAC/format.c @@ -45,9 +45,15 @@ #include "private/macros.h" /* FLAC_PACKAGE_VERSION should come from configure */ +#if defined(__LIBRETRO__) || defined(RARCH_INTERNAL) +FLAC_API const char *FLAC__VERSION_STRING = ""; + +FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC 20170101"; +#else FLAC_API const char *FLAC__VERSION_STRING = FLAC_PACKAGE_VERSION; FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " FLAC_PACKAGE_VERSION " 20170101"; +#endif FLAC_API const FLAC__byte FLAC__STREAM_SYNC_STRING[4] = { 'f','L','a','C' }; FLAC_API const unsigned FLAC__STREAM_SYNC = 0x664C6143; diff --git a/libretro-common/formats/libchdr/chd.c b/libretro-common/formats/libchdr/chd.c index 491873eb31..72169a1c94 100644 --- a/libretro-common/formats/libchdr/chd.c +++ b/libretro-common/formats/libchdr/chd.c @@ -1404,6 +1404,7 @@ chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file ** else { err = decompress_v5_map(newchd, &(newchd->header)); + (void)err; } #ifdef NEED_CACHE_HUNK @@ -1435,7 +1436,10 @@ chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file ** /* initialize the codec */ if (newchd->codecintf[0]->init != NULL) + { err = (*newchd->codecintf[0]->init)(&newchd->zlib_codec_data, newchd->header.hunkbytes); + (void)err; + } } else { @@ -1449,7 +1453,10 @@ chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file ** { newchd->codecintf[decompnum] = &codec_interfaces[i]; if (newchd->codecintf[decompnum] == NULL && newchd->header.compression[decompnum] != 0) + { err = CHDERR_UNSUPPORTED_FORMAT; + (void)err; + } /* initialize the codec */ if (newchd->codecintf[decompnum]->init != NULL) @@ -1470,7 +1477,10 @@ chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file ** break; } if (codec != NULL) + { err = (*newchd->codecintf[decompnum]->init)(codec, newchd->header.hunkbytes); + (void)err; + } } } @@ -2438,6 +2448,7 @@ static chd_error zlib_codec_decompress(void *codec, const uint8_t *src, uint32_t /* do it */ zerr = inflate(&data->inflater, Z_FINISH); + (void)zerr; if (data->inflater.total_out != destlen) return CHDERR_DECOMPRESSION_ERROR; diff --git a/pkg/apple/RetroArch.xcodeproj/project.pbxproj b/pkg/apple/RetroArch.xcodeproj/project.pbxproj index fbc28df669..b97bed305d 100644 --- a/pkg/apple/RetroArch.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch.xcodeproj/project.pbxproj @@ -377,6 +377,8 @@ "$(SRCROOT)/../..", "$(SRCROOT)/../../gfx/include", "$(SRCROOT)/../../libretro-common/include", + "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps", ); INFOPLIST_FILE = OSX/Info.plist; @@ -407,6 +409,8 @@ "$(SRCROOT)/../..", "$(SRCROOT)/../../gfx/include", "$(SRCROOT)/../../libretro-common/include", + "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps", ); INFOPLIST_FILE = OSX/Info.plist; @@ -439,6 +443,8 @@ "$(SRCROOT)/../..", "$(SRCROOT)/../../gfx/include", "$(SRCROOT)/../../libretro-common/include", + "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps", ); INFOPLIST_FILE = "$(SRCROOT)/OSX/Info.plist"; @@ -465,6 +471,8 @@ "$(SRCROOT)/../..", "$(SRCROOT)/../../gfx/include", "$(SRCROOT)/../../libretro-common/include", + "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps", ); INFOPLIST_FILE = "$(SRCROOT)/OSX/Info.plist"; @@ -486,7 +494,11 @@ ONLY_ACTIVE_ARCH = NO; OTHER_CFLAGS = ( "-DHAVE_GRIFFIN", - "-DHAVE_STB_VORBIS", + "-DHAVE_FLAC", + "-DHAVE_LROUND", + "-DFLAC__HAS_OGG=0", + "-DHAVE_CHD", + "-DHAVE_STB_VORBIS", "-DHAVE_MINIUPNPC", "-DHAVE_BUILTINMINIUPNPC", "-DHAVE_UPDATE_ASSETS", @@ -544,7 +556,11 @@ MACOSX_DEPLOYMENT_TARGET = 10.5; OTHER_CFLAGS = ( "-DHAVE_GRIFFIN", - "-DHAVE_STB_VORBIS", + "-DHAVE_FLAC", + "-DHAVE_LROUND", + "-DFLAC__HAS_OGG=0", + "-DHAVE_CHD", + "-DHAVE_STB_VORBIS", "-DHAVE_MINIUPNPC", "-DHAVE_BUILTINMINIUPNPC", "-DHAVE_UPDATE_ASSETS",