MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SetDefaultSettings

Method SetDefaultSettings

pcsx2/VMManager.cpp:572–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572void VMManager::SetDefaultSettings(
573 SettingsInterface& si, bool folders, bool core, bool controllers, bool hotkeys, bool ui)
574{
575 FPControlRegisterBackup fpcr_backup(FPControlRegister::GetDefault());
576
577 if (si.GetUIntValue("UI", "SettingsVersion", 0u) != SETTINGS_VERSION)
578 si.SetUIntValue("UI", "SettingsVersion", SETTINGS_VERSION);
579
580 if (folders)
581 EmuFolders::SetDefaults(si);
582 if (core)
583 {
584 Pcsx2Config temp_config;
585 SettingsSaveWrapper ssw(si);
586 temp_config.LoadSave(ssw);
587
588 // Settings not part of the Pcsx2Config struct.
589 si.SetBoolValue("EmuCore", "EnableFastBoot", true);
590
591 SetHardwareDependentDefaultSettings(si);
592 SetDefaultLoggingSettings(si);
593 }
594 if (controllers)
595 {
596 Pad::SetDefaultControllerConfig(si);
597 USB::SetDefaultConfiguration(&si);
598 }
599 if (hotkeys)
600 Pad::SetDefaultHotkeyConfig(si);
601 if (ui)
602 Host::SetDefaultUISettings(si);
603}
604
605void VMManager::LoadSettings()
606{

Callers

nothing calls this directly

Calls 4

GetUIntValueMethod · 0.45
SetUIntValueMethod · 0.45
LoadSaveMethod · 0.45
SetBoolValueMethod · 0.45

Tested by

no test coverage detected