From 674bf9d29d7976d30f27ad61300eb5ba6ca498ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 6 Nov 2026 09:27:08 +0100 Subject: [PATCH] libretro: Only offer "Cache Full ISO in RAM" where it works The option is left out of the core options on mobile, Switch, UWP and 32-bit builds, where the cache isn't used. One macro decides both. Co-Authored-By: Claude Opus 5.5 --- libretro/libretro.cpp | 3 +-- libretro/libretro_core_options.h | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index bdcf719cb6..a82f14165a 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -2101,8 +2101,7 @@ bool System_GetPropertyBool(SystemProperty prop) { return true; #endif case SYSPROP_ENOUGH_RAM_FOR_FULL_ISO: - // Desktops only, like the standalone app. -#if PPSSPP_ARCH(64BIT) && !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(SWITCH) && !PPSSPP_PLATFORM(UWP) +#ifdef LIBRETRO_CAN_CACHE_ISO_IN_RAM return true; #else return false; diff --git a/libretro/libretro_core_options.h b/libretro/libretro_core_options.h index 79f1404a29..12a59fdebd 100644 --- a/libretro/libretro_core_options.h +++ b/libretro/libretro_core_options.h @@ -7,6 +7,13 @@ #include #include +#include "ppsspp_config.h" + +// Desktops only, like the standalone app (SYSPROP_ENOUGH_RAM_FOR_FULL_ISO). +#if PPSSPP_ARCH(64BIT) && !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(SWITCH) && !PPSSPP_PLATFORM(UWP) +#define LIBRETRO_CAN_CACHE_ISO_IN_RAM 1 +#endif + #ifndef HAVE_NO_LANGEXTRA #include "libretro_core_options_intl.h" #endif @@ -223,6 +230,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { BOOL_OPTIONS, "enabled" }, +#ifdef LIBRETRO_CAN_CACHE_ISO_IN_RAM { "ppsspp_cache_iso", "Cache Full ISO in RAM", @@ -233,6 +241,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { BOOL_OPTIONS, "disabled" }, +#endif { "ppsspp_cheats", "Internal Cheats Support",