From d657e5b701d199370ede418e0f2064e4ac21f655 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Thu, 30 Nov 2023 06:29:46 -0500 Subject: [PATCH] xdelta support on macos/ios/tvos (#15964) --- griffin/griffin.c | 14 ++++++++++++++ pkg/apple/BaseConfig.xcconfig | 1 + .../RetroArch_iOS13.xcodeproj/project.pbxproj | 2 ++ 3 files changed, 17 insertions(+) diff --git a/griffin/griffin.c b/griffin/griffin.c index 1c40fb54bdcb..5cb54b6bf3c6 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1261,6 +1261,20 @@ DATA RUNLOOP #endif #ifdef HAVE_PATCH #include "../tasks/task_patch.c" +#ifdef HAVE_XDELTA +#define adler32(...) xdelta_adler32(__VA_ARGS__) +#include "../deps/xdelta3/xdelta3.c" +#undef adler32 +#ifdef Q +#undef Q +#endif +#ifdef W +#undef W +#endif +#ifdef Z +#undef Z +#endif +#endif #endif #include "../tasks/task_save.c" #include "../tasks/task_movie.c" diff --git a/pkg/apple/BaseConfig.xcconfig b/pkg/apple/BaseConfig.xcconfig index 4ee63c8af984..a33742741775 100644 --- a/pkg/apple/BaseConfig.xcconfig +++ b/pkg/apple/BaseConfig.xcconfig @@ -86,6 +86,7 @@ OTHER_CFLAGS = $(inherited) -DHAVE_UPDATE_CORE_INFO OTHER_CFLAGS = $(inherited) -DHAVE_VIDEO_FILTER OTHER_CFLAGS = $(inherited) -DHAVE_VIDEO_LAYOUT OTHER_CFLAGS = $(inherited) -DHAVE_VULKAN +OTHER_CFLAGS = $(inherited) -DHAVE_XDELTA OTHER_CFLAGS = $(inherited) -DHAVE_XMB OTHER_CFLAGS = $(inherited) -DHAVE_ZLIB OTHER_CFLAGS = $(inherited) -DINLINE=inline diff --git a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj index c762bdf503b2..62800a42cc18 100644 --- a/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch_iOS13.xcodeproj/project.pbxproj @@ -2106,6 +2106,7 @@ "-DHAVE_UPDATE_ASSETS", "-DHAVE_UPDATE_CORE_INFO", "-DHAVE_VIDEO_FILTER", + "-DHAVE_XDELTA", "-DHAVE_XMB", "-DHAVE_ZLIB", "-DINLINE=inline", @@ -2223,6 +2224,7 @@ "-DHAVE_UPDATE_ASSETS", "-DHAVE_UPDATE_CORE_INFO", "-DHAVE_VIDEO_FILTER", + "-DHAVE_XDELTA", "-DHAVE_XMB", "-DHAVE_ZLIB", "-DINLINE=inline",