System: Change "Auto Load Cheats" to "Enable Cheats"
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
@@ -1033,7 +1033,7 @@ void FullscreenUI::DoCheatsMenu()
|
||||
if (cc.activation == CheatCode::Activation::Manual)
|
||||
cl->ApplyCode(static_cast<u32>(index));
|
||||
else
|
||||
System::SetCheatCodeState(static_cast<u32>(index), checked, true);
|
||||
System::SetCheatCodeState(static_cast<u32>(index), checked);
|
||||
};
|
||||
OpenChoiceDialog(FSUI_ICONSTR(ICON_FA_FROWN, "Cheat List"), true, std::move(options), std::move(callback));
|
||||
}
|
||||
@@ -2709,16 +2709,10 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
||||
bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Inhibit Screensaver"),
|
||||
FSUI_CSTR("Prevents the screen saver from activating and the host from sleeping while emulation is running."),
|
||||
"Main", "InhibitScreensaver", true);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_GAMEPAD, "Load Devices From Save States"),
|
||||
FSUI_CSTR("When enabled, memory cards and controllers will be overwritten when save states are loaded."), "Main",
|
||||
"LoadDevicesFromSaveStates", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_COGS, "Apply Per-Game Settings"),
|
||||
FSUI_CSTR("When enabled, per-game settings will be applied, and incompatible enhancements will be disabled."),
|
||||
"Main", "ApplyGameSettings", true);
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_FROWN, "Automatically Load Cheats"),
|
||||
FSUI_CSTR("Automatically loads and applies cheats on game start."), "Main", "AutoLoadCheats", true);
|
||||
if (DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_PAINT_BRUSH, "Use Light Theme"),
|
||||
FSUI_CSTR("Uses a light coloured theme instead of the default dark theme."), "Main",
|
||||
"UseLightFullscreenUITheme", false))
|
||||
@@ -2903,22 +2897,30 @@ void FullscreenUI::DrawConsoleSettingsPage()
|
||||
|
||||
MenuHeading(FSUI_CSTR("Console Settings"));
|
||||
|
||||
DrawEnumSetting(bsi, FSUI_CSTR("Region"), FSUI_CSTR("Determines the emulated hardware type."), "Console", "Region",
|
||||
Settings::DEFAULT_CONSOLE_REGION, &Settings::ParseConsoleRegionName, &Settings::GetConsoleRegionName,
|
||||
&Settings::GetConsoleRegionDisplayName, ConsoleRegion::Count);
|
||||
DrawEnumSetting(bsi, FSUI_ICONSTR(ICON_FA_GLOBE, "Region"), FSUI_CSTR("Determines the emulated hardware type."),
|
||||
"Console", "Region", Settings::DEFAULT_CONSOLE_REGION, &Settings::ParseConsoleRegionName,
|
||||
&Settings::GetConsoleRegionName, &Settings::GetConsoleRegionDisplayName, ConsoleRegion::Count);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_CSTR("Enable 8MB RAM"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_MEMORY, "Enable 8MB RAM"),
|
||||
FSUI_CSTR("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles."),
|
||||
"Console", "Enable8MBRAM", false);
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Disable All Enhancements"),
|
||||
FSUI_CSTR("Temporarily disables all enhancements, useful when testing."), "Main",
|
||||
"DisableAllEnhancements", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_FROWN, "Enable Cheats"),
|
||||
FSUI_CSTR("Automatically loads and applies cheats on game start. Cheats can break games and saves."), "Console",
|
||||
"EnableCheats", false);
|
||||
|
||||
MenuHeading(FSUI_CSTR("CPU Emulation"));
|
||||
|
||||
DrawEnumSetting(bsi, FSUI_CSTR("Execution Mode"), FSUI_CSTR("Determines how the emulated CPU executes instructions."),
|
||||
"CPU", "ExecutionMode", Settings::DEFAULT_CPU_EXECUTION_MODE, &Settings::ParseCPUExecutionMode,
|
||||
DrawEnumSetting(bsi, FSUI_ICONSTR(ICON_FA_BOLT, "Execution Mode"),
|
||||
FSUI_CSTR("Determines how the emulated CPU executes instructions."), "CPU", "ExecutionMode",
|
||||
Settings::DEFAULT_CPU_EXECUTION_MODE, &Settings::ParseCPUExecutionMode,
|
||||
&Settings::GetCPUExecutionModeName, &Settings::GetCPUExecutionModeDisplayName,
|
||||
CPUExecutionMode::Count);
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Overclocking"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_TACHOMETER_ALT, "Enable Overclocking"),
|
||||
FSUI_CSTR("When this option is chosen, the clock speed set below will be used."), "CPU",
|
||||
"OverclockEnable", false);
|
||||
|
||||
@@ -2939,37 +2941,34 @@ void FullscreenUI::DrawConsoleSettingsPage()
|
||||
}
|
||||
}
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Recompiler ICache"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MICROCHIP, "Enable Recompiler ICache"),
|
||||
FSUI_CSTR("Makes games run closer to their console framerate, at a small cost to performance."),
|
||||
"CPU", "RecompilerICache", false);
|
||||
|
||||
MenuHeading(FSUI_CSTR("CD-ROM Emulation"));
|
||||
|
||||
DrawIntListSetting(
|
||||
bsi, FSUI_CSTR("Read Speedup"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_COMPACT_DISC, "Read Speedup"),
|
||||
FSUI_CSTR(
|
||||
"Speeds up CD-ROM reads by the specified factor. May improve loading speeds in some games, and break others."),
|
||||
"CDROM", "ReadSpeedup", 1, cdrom_read_speeds.data(), cdrom_read_speeds.size(), true, 1);
|
||||
DrawIntListSetting(
|
||||
bsi, FSUI_CSTR("Seek Speedup"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_SEARCH, "Seek Speedup"),
|
||||
FSUI_CSTR(
|
||||
"Speeds up CD-ROM seeks by the specified factor. May improve loading speeds in some games, and break others."),
|
||||
"CDROM", "SeekSpeedup", 1, cdrom_seek_speeds.data(), cdrom_seek_speeds.size(), true);
|
||||
|
||||
DrawIntRangeSetting(
|
||||
bsi, FSUI_CSTR("Readahead Sectors"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_FAST_FORWARD, "Readahead Sectors"),
|
||||
FSUI_CSTR("Reduces hitches in emulation by reading/decompressing CD data asynchronously on a worker thread."),
|
||||
"CDROM", "ReadaheadSectors", Settings::DEFAULT_CDROM_READAHEAD_SECTORS, 0, 32, "%d sectors");
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Region Check"),
|
||||
FSUI_CSTR("Simulates the region check present in original, unmodified consoles."), "CDROM",
|
||||
"RegionCheck", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_CSTR("Preload Images to RAM"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_DOWNLOAD, "Preload Images to RAM"),
|
||||
FSUI_CSTR("Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay."),
|
||||
"CDROM", "LoadImageToRAM", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_CSTR("Apply Image Patches"),
|
||||
bsi, FSUI_ICONSTR(ICON_FA_VEST_PATCHES, "Apply Image Patches"),
|
||||
FSUI_CSTR("Automatically applies patches to disc images when they are present, currently only PPF is supported."),
|
||||
"CDROM", "LoadImagePatches", false);
|
||||
|
||||
@@ -4654,10 +4653,6 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
||||
|
||||
MenuHeading(FSUI_CSTR("Debugging Settings"));
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Disable All Enhancements"),
|
||||
FSUI_CSTR("Temporarily disables all enhancements, useful when testing."), "Main",
|
||||
"DisableAllEnhancements", false);
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Use Debug GPU Device"),
|
||||
FSUI_CSTR("Enable debugging when supported by the host's renderer API. Only for developer use."),
|
||||
"GPU", "UseDebugDevice", false);
|
||||
@@ -4675,6 +4670,10 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Create Save State Backups"),
|
||||
FSUI_CSTR("Renames existing save states when saving to a backup file."), "Main",
|
||||
"CreateSaveStateBackups", false);
|
||||
DrawToggleSetting(
|
||||
bsi, FSUI_ICONSTR(ICON_FA_GAMEPAD, "Load Devices From Save States"),
|
||||
FSUI_CSTR("When enabled, memory cards and controllers will be overwritten when save states are loaded."), "Main",
|
||||
"LoadDevicesFromSaveStates", false);
|
||||
|
||||
MenuHeading(FSUI_CSTR("Display Settings"));
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Show Status Indicators"),
|
||||
@@ -4740,6 +4739,12 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
||||
"FastmemMode", Settings::DEFAULT_CPU_FASTMEM_MODE, &Settings::ParseCPUFastmemMode,
|
||||
&Settings::GetCPUFastmemModeName, &Settings::GetCPUFastmemModeDisplayName, CPUFastmemMode::Count);
|
||||
|
||||
MenuHeading(FSUI_CSTR("CD-ROM Emulation"));
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Region Check"),
|
||||
FSUI_CSTR("Simulates the region check present in original, unmodified consoles."), "CDROM",
|
||||
"RegionCheck", false);
|
||||
|
||||
EndMenuButtons();
|
||||
}
|
||||
|
||||
@@ -4891,7 +4896,7 @@ void FullscreenUI::DrawPauseMenu()
|
||||
}
|
||||
|
||||
if (ActiveButton(FSUI_ICONSTR(ICON_FA_FROWN_OPEN, "Cheat List"), false,
|
||||
!System::GetGameSerial().empty() && !Achievements::IsHardcoreModeActive()))
|
||||
!System::GetGameSerial().empty() && g_settings.enable_cheats))
|
||||
{
|
||||
s_current_main_window = MainWindowType::None;
|
||||
DoCheatsMenu();
|
||||
@@ -6575,9 +6580,8 @@ TRANSLATE_NOOP("FullscreenUI", "Automatic based on window size");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatic mapping completed for {}.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatic mapping failed for {}.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatic mapping failed, no devices are available.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically Load Cheats");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically applies patches to disc images when they are present, currently only PPF is supported.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically loads and applies cheats on game start.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically loads and applies cheats on game start. Cheats can break games and saves.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically saves the emulator state when powering down or exiting. You can then resume directly from where you left off next time.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatically switches to fullscreen mode when the program is started.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Avoids calls to C++ code, significantly speeding up the recompiler.");
|
||||
@@ -6691,6 +6695,7 @@ TRANSLATE_NOOP("FullscreenUI", "Emulation Settings");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Emulation Speed");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable 8MB RAM");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Achievements");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Cheats");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Discord Presence");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Fast Boot");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable In-Game Overlays");
|
||||
@@ -6706,7 +6711,6 @@ TRANSLATE_NOOP("FullscreenUI", "Enable SDL Input Source");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Subdirectory Scanning");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable TTY Logging");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VRAM Write Texture Replacement");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VSync");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable XInput Input Source");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable debugging when supported by the host's renderer API. Only for developer use.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enables alignment and bus exceptions. Not needed for any known games.");
|
||||
@@ -7075,6 +7079,7 @@ TRANSLATE_NOOP("FullscreenUI", "Uses game-specific settings for controllers for
|
||||
TRANSLATE_NOOP("FullscreenUI", "Uses perspective-correct interpolation for colors, which can improve visuals in some games.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Uses perspective-correct interpolation for texture coordinates, straightening out warped textures.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Uses screen positions to resolve PGXP data. May improve visuals in some games.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VSync");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Value: {} | Default: {} | Minimum: {} | Maximum: {}");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled and logged in, DuckStation will scan for achievements on startup.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "When enabled, DuckStation will assume all achievements are locked and not send any unlock notifications to the server.");
|
||||
|
||||
@@ -151,7 +151,7 @@ void Settings::Load(SettingsInterface& si)
|
||||
load_devices_from_save_states = si.GetBoolValue("Main", "LoadDevicesFromSaveStates", false);
|
||||
apply_compatibility_settings = si.GetBoolValue("Main", "ApplyCompatibilitySettings", true);
|
||||
apply_game_settings = si.GetBoolValue("Main", "ApplyGameSettings", true);
|
||||
auto_load_cheats = si.GetBoolValue("Main", "AutoLoadCheats", true);
|
||||
enable_cheats = si.GetBoolValue("Console", "EnableCheats", false);
|
||||
disable_all_enhancements = si.GetBoolValue("Main", "DisableAllEnhancements", false);
|
||||
enable_discord_presence = si.GetBoolValue("Main", "EnableDiscordPresence", false);
|
||||
rewind_enable = si.GetBoolValue("Main", "RewindEnable", false);
|
||||
@@ -444,7 +444,7 @@ void Settings::Save(SettingsInterface& si) const
|
||||
si.SetBoolValue("Main", "LoadDevicesFromSaveStates", load_devices_from_save_states);
|
||||
si.SetBoolValue("Main", "ApplyCompatibilitySettings", apply_compatibility_settings);
|
||||
si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings);
|
||||
si.SetBoolValue("Main", "AutoLoadCheats", auto_load_cheats);
|
||||
si.SetBoolValue("Console", "EnableCheats", enable_cheats);
|
||||
si.SetBoolValue("Main", "DisableAllEnhancements", disable_all_enhancements);
|
||||
si.SetBoolValue("Main", "EnableDiscordPresence", enable_discord_presence);
|
||||
si.SetBoolValue("Main", "RewindEnable", rewind_enable);
|
||||
@@ -728,7 +728,7 @@ void Settings::FixIncompatibleSettings(bool display_osd_messages)
|
||||
(g_settings.fast_forward_speed != 0.0f) ? std::max(g_settings.fast_forward_speed, 1.0f) : 0.0f;
|
||||
g_settings.turbo_speed = (g_settings.turbo_speed != 0.0f) ? std::max(g_settings.turbo_speed, 1.0f) : 0.0f;
|
||||
g_settings.rewind_enable = false;
|
||||
g_settings.auto_load_cheats = false;
|
||||
g_settings.enable_cheats = false;
|
||||
if (g_settings.cpu_overclock_enable && g_settings.GetCPUOverclockPercent() < 100)
|
||||
{
|
||||
g_settings.cpu_overclock_enable = false;
|
||||
|
||||
@@ -87,7 +87,7 @@ struct Settings
|
||||
bool load_devices_from_save_states : 1 = false;
|
||||
bool apply_compatibility_settings : 1 = true;
|
||||
bool apply_game_settings : 1 = true;
|
||||
bool auto_load_cheats : 1 = true;
|
||||
bool enable_cheats : 1 = true;
|
||||
bool disable_all_enhancements : 1 = false;
|
||||
bool enable_discord_presence : 1 = false;
|
||||
|
||||
@@ -518,6 +518,8 @@ struct Settings
|
||||
#endif
|
||||
static constexpr AudioStretchMode DEFAULT_AUDIO_STRETCH_MODE = AudioStretchMode::TimeStretch;
|
||||
|
||||
static constexpr bool DEFAULT_SAVE_STATE_COMPRESSION = true;
|
||||
|
||||
// Enable console logging by default on Linux platforms.
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
static constexpr bool DEFAULT_LOG_TO_CONSOLE = true;
|
||||
@@ -527,12 +529,10 @@ struct Settings
|
||||
|
||||
// Android doesn't create settings until they're first opened, so we have to override the defaults here.
|
||||
#ifndef __ANDROID__
|
||||
static constexpr bool DEFAULT_SAVE_STATE_COMPRESSION = true;
|
||||
static constexpr bool DEFAULT_SAVE_STATE_BACKUPS = true;
|
||||
static constexpr bool DEFAULT_FAST_BOOT_VALUE = false;
|
||||
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 0.0f;
|
||||
#else
|
||||
static constexpr bool DEFAULT_SAVE_STATE_COMPRESSION = true;
|
||||
static constexpr bool DEFAULT_SAVE_STATE_BACKUPS = false;
|
||||
static constexpr bool DEFAULT_FAST_BOOT_VALUE = true;
|
||||
static constexpr float DEFAULT_DISPLAY_MAX_FPS = 60.0f;
|
||||
|
||||
@@ -3400,8 +3400,8 @@ void System::UpdateRunningGame(const char* path, CDImage* image, bool booting)
|
||||
ApplySettings(true);
|
||||
|
||||
s_cheat_list.reset();
|
||||
if (g_settings.auto_load_cheats && !Achievements::IsHardcoreModeActive())
|
||||
LoadCheatListFromGameTitle();
|
||||
if (g_settings.enable_cheats)
|
||||
LoadCheatList();
|
||||
|
||||
if (s_running_game_serial != prev_serial)
|
||||
UpdateSessionTime(prev_serial);
|
||||
@@ -3655,6 +3655,14 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
||||
CPU::ClearICache();
|
||||
}
|
||||
|
||||
if (g_settings.enable_cheats != old_settings.enable_cheats)
|
||||
{
|
||||
if (g_settings.enable_cheats)
|
||||
LoadCheatList();
|
||||
else
|
||||
s_cheat_list.reset();
|
||||
}
|
||||
|
||||
SPU::GetOutputStream()->SetOutputVolume(GetAudioOutputVolume());
|
||||
|
||||
if (g_settings.gpu_resolution_scale != old_settings.gpu_resolution_scale ||
|
||||
@@ -4534,15 +4542,20 @@ std::string System::GetCheatFileName()
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool System::LoadCheatList(const char* filename)
|
||||
bool System::LoadCheatList()
|
||||
{
|
||||
if (System::IsShutdown())
|
||||
// Called when booting, needs to test for shutdown.
|
||||
if (IsShutdown() || !g_settings.enable_cheats)
|
||||
return false;
|
||||
|
||||
const std::string filename(GetCheatFileName());
|
||||
if (filename.empty() || !FileSystem::FileExists(filename.c_str()))
|
||||
return false;
|
||||
|
||||
std::unique_ptr<CheatList> cl = std::make_unique<CheatList>();
|
||||
if (!cl->LoadFromFile(filename, CheatList::Format::Autodetect))
|
||||
if (!cl->LoadFromFile(filename.c_str(), CheatList::Format::Autodetect))
|
||||
{
|
||||
Host::AddFormattedOSDMessage(15.0f, TRANSLATE("OSDMessage", "Failed to load cheats from '%s'."), filename);
|
||||
Host::AddFormattedOSDMessage(15.0f, TRANSLATE("OSDMessage", "Failed to load cheats from '%s'."), filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4558,19 +4571,6 @@ bool System::LoadCheatList(const char* filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool System::LoadCheatListFromGameTitle()
|
||||
{
|
||||
// Called when booting, needs to test for shutdown.
|
||||
if (IsShutdown() || Achievements::IsHardcoreModeActive())
|
||||
return false;
|
||||
|
||||
const std::string filename(GetCheatFileName());
|
||||
if (filename.empty() || !FileSystem::FileExists(filename.c_str()))
|
||||
return false;
|
||||
|
||||
return LoadCheatList(filename.c_str());
|
||||
}
|
||||
|
||||
bool System::LoadCheatListFromDatabase()
|
||||
{
|
||||
if (IsShutdown() || s_running_game_serial.empty() || Achievements::IsHardcoreModeActive())
|
||||
@@ -4650,7 +4650,7 @@ void System::ClearCheatList(bool save_to_file)
|
||||
SaveCheatList();
|
||||
}
|
||||
|
||||
void System::SetCheatCodeState(u32 index, bool enabled, bool save_to_file)
|
||||
void System::SetCheatCodeState(u32 index, bool enabled)
|
||||
{
|
||||
if (!System::IsValid() || !System::HasCheatList())
|
||||
return;
|
||||
@@ -4676,8 +4676,7 @@ void System::SetCheatCodeState(u32 index, bool enabled, bool save_to_file)
|
||||
Host::AddFormattedOSDMessage(5.0f, TRANSLATE("OSDMessage", "Cheat '%s' disabled."), cc.description.c_str());
|
||||
}
|
||||
|
||||
if (save_to_file)
|
||||
SaveCheatList();
|
||||
SaveCheatList();
|
||||
}
|
||||
|
||||
void System::ApplyCheatCode(u32 index)
|
||||
|
||||
@@ -421,11 +421,8 @@ bool SaveScreenshot(const char* filename = nullptr, DisplayScreenshotMode mode =
|
||||
DisplayScreenshotFormat format = g_settings.display_screenshot_format,
|
||||
u8 quality = g_settings.display_screenshot_quality, bool compress_on_thread = true);
|
||||
|
||||
/// Loads the cheat list from the specified file.
|
||||
bool LoadCheatList(const char* filename);
|
||||
|
||||
/// Loads the cheat list for the current game title from the user directory.
|
||||
bool LoadCheatListFromGameTitle();
|
||||
bool LoadCheatList();
|
||||
|
||||
/// Loads the cheat list for the current game code from the built-in code database.
|
||||
bool LoadCheatListFromDatabase();
|
||||
@@ -443,7 +440,7 @@ bool DeleteCheatList();
|
||||
void ClearCheatList(bool save_to_file);
|
||||
|
||||
/// Enables/disabled the specified cheat code.
|
||||
void SetCheatCodeState(u32 index, bool enabled, bool save_to_file);
|
||||
void SetCheatCodeState(u32 index, bool enabled);
|
||||
|
||||
/// Immediately applies the specified cheat code.
|
||||
void ApplyCheatCode(u32 index);
|
||||
|
||||
Reference in New Issue
Block a user