From b9530ae80f9994f4a10143f8336f2b9bee4416fc Mon Sep 17 00:00:00 2001 From: Kleidis Date: Wed, 17 Dec 2025 03:59:27 +0100 Subject: [core] Add overridable game setting functionality (#2963) Adds a place to override specific game settings for specific vendors Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2963 Reviewed-by: Caio Oliveira Reviewed-by: Maufeat Co-authored-by: Kleidis Co-committed-by: Kleidis --- src/core/core.cpp | 46 +++------------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index edc2df4851..bf97184f8f 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -6,6 +6,7 @@ #include #include +#include "game_settings.h" #include "audio_core/audio_core.h" #include "common/fs/fs.h" #include "common/logging/log.h" @@ -292,48 +293,6 @@ struct System::Impl { return SystemResultStatus::Success; } - - void LoadOverrides(u64 programId) const { - std::string vendor = gpu_core->Renderer().GetDeviceVendor(); - LOG_INFO(Core, "GPU Vendor: {}", vendor); - - // Reset all per-game flags - Settings::values.use_squashed_iterated_blend = false; - - // Insert PC overrides here - - #ifdef ANDROID - // Example on how to set a setting based on the program ID and vendor - if (programId == 0x010028600EBDA000 && vendor == "Mali") { // Mario 3d World - // Settings::values.example = true; - } - - // Example array of program IDs - const std::array example_array = { - //0xprogramId - 0x0004000000033400, // Game 1 - 0x0004000000033500 // Game 2 - // And so on - }; - - for (auto id : example_array) { - if (programId == id) { - // Settings::values.example = true; - break; - } - } - - #endif - - // Ninja Gaiden Ragebound - constexpr u64 ngr = 0x0100781020710000ULL; - - if (programId == ngr) { - LOG_INFO(Core, "Enabling game specifc override: use_squashed_iterated_blend"); - Settings::values.use_squashed_iterated_blend = true; - } - } - SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window, const std::string& filepath, Service::AM::FrontendAppletParameters& params) { @@ -419,7 +378,8 @@ struct System::Impl { LOG_ERROR(Core, "Failed to find program id for ROM"); } - LoadOverrides(program_id); + + GameSettings::LoadOverrides(program_id, gpu_core->Renderer()); if (auto room_member = Network::GetRoomMember().lock()) { Network::GameInfo game_info; game_info.name = name; -- cgit v1.2.3