mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 14:25:38 +00:00
GameSettings: Add trait for recompiler icache
This commit is contained in:
parent
19d6037b99
commit
914f3ad447
|
@ -32,6 +32,7 @@ std::array<std::pair<const char*, const char*>, static_cast<u32>(Trait::Count)>
|
|||
{"ForcePGXPCPUMode", TRANSLATABLE("GameSettingsTrait", "Force PGXP CPU Mode")},
|
||||
{"ForceDigitalController", TRANSLATABLE("GameSettingsTrait", "Force Digital Controller")},
|
||||
{"ForceRecompilerMemoryExceptions", TRANSLATABLE("GameSettingsTrait", "Force Recompiler Memory Exceptions")},
|
||||
{"ForceRecompilerICache", TRANSLATABLE("GameSettingsTrait", "Force Recompiler ICache")},
|
||||
}};
|
||||
|
||||
const char* GetTraitName(Trait trait)
|
||||
|
@ -459,6 +460,18 @@ void Entry::ApplySettings(bool display_osd_messages) const
|
|||
|
||||
g_settings.cpu_recompiler_memory_exceptions = true;
|
||||
}
|
||||
|
||||
if (HasTrait(Trait::ForceRecompilerICache))
|
||||
{
|
||||
if (display_osd_messages && g_settings.cpu_execution_mode != CPUExecutionMode::Interpreter &&
|
||||
!g_settings.cpu_recompiler_icache)
|
||||
{
|
||||
g_host_interface->AddOSDMessage(
|
||||
g_host_interface->TranslateStdString("OSDMessage", "Recompiler ICache forced by game settings."), osd_duration);
|
||||
}
|
||||
|
||||
g_settings.cpu_recompiler_icache = true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace GameSettings
|
|
@ -23,6 +23,7 @@ enum class Trait : u32
|
|||
ForcePGXPCPUMode,
|
||||
ForceDigitalController,
|
||||
ForceRecompilerMemoryExceptions,
|
||||
ForceRecompilerICache,
|
||||
|
||||
Count
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue