mirror of https://github.com/PCSX2/pcsx2.git
PAD: Split set default controller and hotkey settings
This commit is contained in:
parent
291063bd98
commit
1b3bf89ee8
|
@ -251,7 +251,8 @@ void QtHost::SetDefaultConfig()
|
|||
}
|
||||
|
||||
EmuFolders::Save(si);
|
||||
PAD::SetDefaultConfig(si);
|
||||
PAD::SetDefaultControllerConfig(si);
|
||||
PAD::SetDefaultHotkeyConfig(si);
|
||||
}
|
||||
|
||||
void QtHost::SetBaseBoolSettingValue(const char* section, const char* key, bool value)
|
||||
|
|
|
@ -206,7 +206,8 @@ void ControllerSettingsDialog::onRestoreDefaultsClicked()
|
|||
// actually restore it
|
||||
{
|
||||
auto lock = Host::GetSettingsLock();
|
||||
PAD::SetDefaultConfig(*Host::Internal::GetBaseSettingsLayer());
|
||||
PAD::SetDefaultControllerConfig(*Host::Internal::GetBaseSettingsLayer());
|
||||
PAD::SetDefaultHotkeyConfig(*Host::Internal::GetBaseSettingsLayer());
|
||||
QtHost::QueueSettingsSave();
|
||||
}
|
||||
|
||||
|
|
|
@ -2918,7 +2918,8 @@ void FullscreenUI::ResetControllerSettings()
|
|||
{
|
||||
SettingsInterface* dsi = GetEditingSettingsInterface();
|
||||
|
||||
PAD::SetDefaultConfig(*dsi);
|
||||
PAD::SetDefaultControllerConfig(*dsi);
|
||||
PAD::SetDefaultHotkeyConfig(*dsi);
|
||||
ShowToast(std::string(), "Controller settings reset to default.");
|
||||
}
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ const char* PAD::GetDefaultPadType(u32 pad)
|
|||
return (pad == 0) ? "DualShock2" : "None";
|
||||
}
|
||||
|
||||
void PAD::SetDefaultConfig(SettingsInterface& si)
|
||||
void PAD::SetDefaultControllerConfig(SettingsInterface& si)
|
||||
{
|
||||
si.ClearSection("InputSources");
|
||||
si.ClearSection("Hotkeys");
|
||||
|
@ -324,7 +324,10 @@ void PAD::SetDefaultConfig(SettingsInterface& si)
|
|||
// PCSX2 Controller Settings - Controller 1 / Controller 2 / ...
|
||||
// Use the automapper to set this up.
|
||||
MapController(si, 0, InputManager::GetGenericBindingMapping("Keyboard"));
|
||||
}
|
||||
|
||||
void PAD::SetDefaultHotkeyConfig(SettingsInterface& si)
|
||||
{
|
||||
// PCSX2 Controller Settings - Hotkeys
|
||||
|
||||
// PCSX2 Controller Settings - Hotkeys - General
|
||||
|
|
|
@ -137,7 +137,8 @@ namespace PAD
|
|||
void LoadConfig(const SettingsInterface& si);
|
||||
|
||||
/// Restores default configuration.
|
||||
void SetDefaultConfig(SettingsInterface& si);
|
||||
void SetDefaultControllerConfig(SettingsInterface& si);
|
||||
void SetDefaultHotkeyConfig(SettingsInterface& si);
|
||||
|
||||
/// Clears all bindings for a given port.
|
||||
void ClearPortBindings(SettingsInterface& si, u32 port);
|
||||
|
|
Loading…
Reference in New Issue