mirror of https://github.com/PCSX2/pcsx2.git
PAD/Host: Add default settings
This commit is contained in:
parent
d4721d50f7
commit
b709810079
|
@ -176,6 +176,56 @@ void PAD::LoadConfig(const SettingsInterface& si)
|
|||
}
|
||||
}
|
||||
|
||||
void PAD::SetDefaultConfig(SettingsInterface& si)
|
||||
{
|
||||
si.ClearSection("InputSources");
|
||||
|
||||
for (u32 i = 0; i < GAMEPAD_NUMBER; i++)
|
||||
si.ClearSection(StringUtil::StdStringFromFormat("Pad%u", i + 1).c_str());
|
||||
|
||||
si.ClearSection("Hotkeys");
|
||||
|
||||
si.SetBoolValue("InputSources", "SDL", true);
|
||||
si.SetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
|
||||
si.SetBoolValue("InputSources", "XInput", false);
|
||||
|
||||
si.SetStringValue("Pad1", "Type", "DualShock2");
|
||||
si.SetStringValue("Pad1", "Up", "Keyboard/Up");
|
||||
si.SetStringValue("Pad1", "Right", "Keyboard/Right");
|
||||
si.SetStringValue("Pad1", "Down", "Keyboard/Down");
|
||||
si.SetStringValue("Pad1", "Left", "Keyboard/Left");
|
||||
si.SetStringValue("Pad1", "LUp", "Keyboard/W");
|
||||
si.SetStringValue("Pad1", "LRight", "Keyboard/D");
|
||||
si.SetStringValue("Pad1", "LDown", "Keyboard/S");
|
||||
si.SetStringValue("Pad1", "LLeft", "Keyboard/A");
|
||||
si.SetStringValue("Pad1", "RUp", "Keyboard/T");
|
||||
si.SetStringValue("Pad1", "RRight", "Keyboard/H");
|
||||
si.SetStringValue("Pad1", "RDown", "Keyboard/G");
|
||||
si.SetStringValue("Pad1", "RLeft", "Keyboard/F");
|
||||
si.SetStringValue("Pad1", "Triangle", "Keyboard/I");
|
||||
si.SetStringValue("Pad1", "Circle", "Keyboard/L");
|
||||
si.SetStringValue("Pad1", "Cross", "Keyboard/K");
|
||||
si.SetStringValue("Pad1", "Square", "Keyboard/J");
|
||||
si.SetStringValue("Pad1", "L1", "Keyboard/Q");
|
||||
si.SetStringValue("Pad1", "L2", "Keyboard/1");
|
||||
si.SetStringValue("Pad1", "L3", "Keyboard/2");
|
||||
si.SetStringValue("Pad1", "R1", "Keyboard/E");
|
||||
si.SetStringValue("Pad1", "R2", "Keyboard/3");
|
||||
si.SetStringValue("Pad1", "R3", "Keyboard/4");
|
||||
si.SetStringValue("Pad1", "Start", "Keyboard/Return");
|
||||
si.SetStringValue("Pad1", "Select", "Keyboard/Backspace");
|
||||
|
||||
si.SetStringValue("Hotkeys", "ToggleTurbo", "Keyboard/Tab");
|
||||
si.SetStringValue("Hotkeys", "ToggleFrameLimit", "Keyboard/F4");
|
||||
si.SetStringValue("Hotkeys", "ToggleSoftwareRendering", "Keyboard/F9");
|
||||
si.SetStringValue("Hotkeys", "TogglePause", "Keyboard/Space");
|
||||
si.SetStringValue("Hotkeys", "ToggleFullscreen", "Keyboard/Alt & Keyboard/Return");
|
||||
si.SetStringValue("Hotkeys", "Screenshot", "Keyboard/F8");
|
||||
si.SetStringValue("Hotkeys", "SaveStateToSlot", "Keyboard/F1");
|
||||
si.SetStringValue("Hotkeys", "NextSaveStateSlot", "Keyboard/F2");
|
||||
si.SetStringValue("Hotkeys", "LoadStateFromSlot", "Keyboard/F3");
|
||||
}
|
||||
|
||||
void PAD::Update()
|
||||
{
|
||||
Pad::rumble_all();
|
||||
|
|
|
@ -46,6 +46,9 @@ namespace PAD
|
|||
/// Reloads configuration.
|
||||
void LoadConfig(const SettingsInterface& si);
|
||||
|
||||
/// Restores default configuration.
|
||||
void SetDefaultConfig(SettingsInterface& si);
|
||||
|
||||
/// Updates vibration and other internal state. Called at the *end* of a frame.
|
||||
void Update();
|
||||
|
||||
|
|
Loading…
Reference in New Issue