| 570 | } |
| 571 | |
| 572 | void 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 | |
| 605 | void VMManager::LoadSettings() |
| 606 | { |
nothing calls this directly
no test coverage detected