From 8de17098d1dc85dc6cd07fd643955e36f48c24c2 Mon Sep 17 00:00:00 2001 From: pstef Date: Sun, 21 Sep 2025 23:55:55 +0200 Subject: [PATCH] Ctr fixes (#18276) --- Makefile.ctr | 18 +++++++++--------- deps/rcheevos/src/rcheevos/runtime.c | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile.ctr b/Makefile.ctr index a4125033f6..12fa3112e2 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -68,6 +68,14 @@ ifeq ($(GRIFFIN_BUILD), 1) #DEFINES += -DHAVE_SOCKET_LEGACY #-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL #ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file + CFLAGS += -I. \ + -Ideps \ + -Ideps/7zip \ + -Ideps/stb \ + -Ideps/mbedtls \ + -Ideps/rcheevos/include \ + -Ilibretro-common/include \ + -Ilibretro-common/include/compat/zlib else HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 @@ -104,7 +112,7 @@ else HAVE_CLOUDSYNC = 1 include Makefile.common - CFLAGS += $(DEF_FLAGS) + CFLAGS += $(DEF_FLAGS) -I. $(INCLUDE_DIRS) endif ifeq ($(strip $(DEVKITPRO)),) @@ -180,14 +188,6 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1) WHOLE_END := -Wl,--no-whole-archive endif -CFLAGS += -I. \ - -Ideps \ - -Ideps/7zip \ - -Ideps/stb \ - -Ideps/mbedtls \ - -Ideps/rcheevos/include \ - -Ilibretro-common/include \ - -Ilibretro-common/include/compat/zlib CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) diff --git a/deps/rcheevos/src/rcheevos/runtime.c b/deps/rcheevos/src/rcheevos/runtime.c index 042521f695..fe6736f91d 100644 --- a/deps/rcheevos/src/rcheevos/runtime.c +++ b/deps/rcheevos/src/rcheevos/runtime.c @@ -341,8 +341,9 @@ int rc_runtime_activate_lboard(rc_runtime_t* self, uint32_t id, const char* mema for (i = 0; i < self->lboard_count; ++i) { if (self->lboards[i].id == id && memcmp(self->lboards[i].md5, md5, 16) == 0) { /* retrieve the lboard pointer from the buffer */ - size = 0; - lboard = (rc_lboard_t*)rc_alloc(self->lboards[i].buffer, &size, sizeof(rc_lboard_t), RC_ALIGNOF(rc_lboard_t), NULL, -1); + int32_t offset = 0; + + lboard = (rc_lboard_t*)rc_alloc(self->lboards[i].buffer, &offset, sizeof(rc_lboard_t), RC_ALIGNOF(rc_lboard_t), NULL, -1); self->lboards[i].lboard = lboard; rc_reset_lboard(lboard);