From 481f31fe8f2e939c3639825560e3f94819fb3a57 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 20 Jan 2020 04:31:32 +0100 Subject: [PATCH] Turn task_patch.c into separately compiled file --- Makefile.common | 1 + griffin/griffin.c | 1 + tasks/task_content.c | 2 -- tasks/task_patch.c | 2 +- tasks/tasks_internal.h | 10 ++++++++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 96217ee911..586aa37f34 100644 --- a/Makefile.common +++ b/Makefile.common @@ -170,6 +170,7 @@ OBJ += frontend/frontend_driver.o \ intl/msg_hash_us.o \ $(LIBRETRO_COMM_DIR)/queues/task_queue.o \ tasks/task_content.o \ + tasks/task_patch.o \ tasks/task_save.o \ tasks/task_file_transfer.o \ tasks/task_image.o \ diff --git a/griffin/griffin.c b/griffin/griffin.c index 91b9b2a5ee..40312bb175 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1204,6 +1204,7 @@ DATA RUNLOOP ============================================================ */ #include "../tasks/task_powerstate.c" #include "../tasks/task_content.c" +#include "../tasks/task_patch.c" #include "../tasks/task_save.c" #include "../tasks/task_image.c" #include "../tasks/task_file_transfer.c" diff --git a/tasks/task_content.c b/tasks/task_content.c index 074e7d8fbe..76e21455b5 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -109,8 +109,6 @@ #include "../discord/discord.h" -#include "task_patch.c" - extern bool discord_is_inited; #define MAX_ARGS 32 diff --git a/tasks/task_patch.c b/tasks/task_patch.c index bb1b79db63..1fc8f210e5 100644 --- a/tasks/task_patch.c +++ b/tasks/task_patch.c @@ -722,7 +722,7 @@ static bool try_ips_patch(bool allow_ips, * Apply patch to the content file in-memory. * **/ -static bool patch_content( +bool patch_content( bool is_ips_pref, bool is_bps_pref, bool is_ups_pref, diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index c92e927952..44f4ea15ca 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -136,6 +136,16 @@ bool task_push_overlay_load_default( void *user_data); #endif +bool patch_content( + bool is_ips_pref, + bool is_bps_pref, + bool is_ups_pref, + const char *name_ips, + const char *name_bps, + const char *name_ups, + uint8_t **buf, + void *data); + bool task_check_decompress(const char *source_file); void *task_push_decompress(