Wrap some more control expression around ``
This isn't entirely necessary, as they are interpreted as barewords expressions, but it's still nicer to have by default. And my upcoming input changes will always put `` around single letter inputs.
This commit is contained in:
parent
81092cf7e4
commit
d586163e38
|
@ -181,17 +181,17 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||||
EmulatedController::LoadDefaults(ciface);
|
EmulatedController::LoadDefaults(ciface);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
m_buttons->SetControlExpression(0, "X"); // A
|
m_buttons->SetControlExpression(0, "`X`"); // A
|
||||||
m_buttons->SetControlExpression(1, "Z"); // B
|
m_buttons->SetControlExpression(1, "`Z`"); // B
|
||||||
m_buttons->SetControlExpression(2, "C"); // X
|
m_buttons->SetControlExpression(2, "`C`"); // X
|
||||||
m_buttons->SetControlExpression(3, "S"); // Y
|
m_buttons->SetControlExpression(3, "`S`"); // Y
|
||||||
m_buttons->SetControlExpression(4, "D"); // Z
|
m_buttons->SetControlExpression(4, "`D`"); // Z
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
m_buttons->SetControlExpression(5, "RETURN"); // Start
|
m_buttons->SetControlExpression(5, "`RETURN`"); // Start
|
||||||
#else
|
#else
|
||||||
// OS X/Linux
|
// OS X/Linux
|
||||||
// Start
|
// Start
|
||||||
m_buttons->SetControlExpression(5, "Return");
|
m_buttons->SetControlExpression(5, "`Return`");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// stick modifiers to 50 %
|
// stick modifiers to 50 %
|
||||||
|
@ -199,46 +199,46 @@ void GCPad::LoadDefaults(const ControllerInterface& ciface)
|
||||||
m_c_stick->controls[4]->control_ref->range = 0.5f;
|
m_c_stick->controls[4]->control_ref->range = 0.5f;
|
||||||
|
|
||||||
// D-Pad
|
// D-Pad
|
||||||
m_dpad->SetControlExpression(0, "T"); // Up
|
m_dpad->SetControlExpression(0, "`T`"); // Up
|
||||||
m_dpad->SetControlExpression(1, "G"); // Down
|
m_dpad->SetControlExpression(1, "`G`"); // Down
|
||||||
m_dpad->SetControlExpression(2, "F"); // Left
|
m_dpad->SetControlExpression(2, "`F`"); // Left
|
||||||
m_dpad->SetControlExpression(3, "H"); // Right
|
m_dpad->SetControlExpression(3, "`H`"); // Right
|
||||||
|
|
||||||
// C Stick
|
// C Stick
|
||||||
m_c_stick->SetControlExpression(0, "I"); // Up
|
m_c_stick->SetControlExpression(0, "`I`"); // Up
|
||||||
m_c_stick->SetControlExpression(1, "K"); // Down
|
m_c_stick->SetControlExpression(1, "`K`"); // Down
|
||||||
m_c_stick->SetControlExpression(2, "J"); // Left
|
m_c_stick->SetControlExpression(2, "`J`"); // Left
|
||||||
m_c_stick->SetControlExpression(3, "L"); // Right
|
m_c_stick->SetControlExpression(3, "`L`"); // Right
|
||||||
// Modifier
|
// Modifier
|
||||||
m_c_stick->SetControlExpression(4, "Ctrl");
|
m_c_stick->SetControlExpression(4, "`Ctrl`");
|
||||||
|
|
||||||
// Control Stick
|
// Control Stick
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
m_main_stick->SetControlExpression(0, "UP"); // Up
|
m_main_stick->SetControlExpression(0, "`UP`"); // Up
|
||||||
m_main_stick->SetControlExpression(1, "DOWN"); // Down
|
m_main_stick->SetControlExpression(1, "`DOWN`"); // Down
|
||||||
m_main_stick->SetControlExpression(2, "LEFT"); // Left
|
m_main_stick->SetControlExpression(2, "`LEFT`"); // Left
|
||||||
m_main_stick->SetControlExpression(3, "RIGHT"); // Right
|
m_main_stick->SetControlExpression(3, "`RIGHT`"); // Right
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
m_main_stick->SetControlExpression(0, "`Up Arrow`"); // Up
|
m_main_stick->SetControlExpression(0, "`Up Arrow`"); // Up
|
||||||
m_main_stick->SetControlExpression(1, "`Down Arrow`"); // Down
|
m_main_stick->SetControlExpression(1, "`Down Arrow`"); // Down
|
||||||
m_main_stick->SetControlExpression(2, "`Left Arrow`"); // Left
|
m_main_stick->SetControlExpression(2, "`Left Arrow`"); // Left
|
||||||
m_main_stick->SetControlExpression(3, "`Right Arrow`"); // Right
|
m_main_stick->SetControlExpression(3, "`Right Arrow`"); // Right
|
||||||
#else
|
#else
|
||||||
m_main_stick->SetControlExpression(0, "Up"); // Up
|
m_main_stick->SetControlExpression(0, "`Up`"); // Up
|
||||||
m_main_stick->SetControlExpression(1, "Down"); // Down
|
m_main_stick->SetControlExpression(1, "`Down`"); // Down
|
||||||
m_main_stick->SetControlExpression(2, "Left"); // Left
|
m_main_stick->SetControlExpression(2, "`Left`"); // Left
|
||||||
m_main_stick->SetControlExpression(3, "Right"); // Right
|
m_main_stick->SetControlExpression(3, "`Right`"); // Right
|
||||||
#endif
|
#endif
|
||||||
// Modifier
|
// Modifier
|
||||||
m_main_stick->SetControlExpression(4, "Shift");
|
m_main_stick->SetControlExpression(4, "`Shift`");
|
||||||
|
|
||||||
// Because our defaults use keyboard input, set calibration shapes to squares.
|
// Because our defaults use keyboard input, set calibration shapes to squares.
|
||||||
m_c_stick->SetCalibrationFromGate(ControllerEmu::SquareStickGate(1.0));
|
m_c_stick->SetCalibrationFromGate(ControllerEmu::SquareStickGate(1.0));
|
||||||
m_main_stick->SetCalibrationFromGate(ControllerEmu::SquareStickGate(1.0));
|
m_main_stick->SetCalibrationFromGate(ControllerEmu::SquareStickGate(1.0));
|
||||||
|
|
||||||
// Triggers
|
// Triggers
|
||||||
m_triggers->SetControlExpression(0, "Q"); // L
|
m_triggers->SetControlExpression(0, "`Q`"); // L
|
||||||
m_triggers->SetControlExpression(1, "W"); // R
|
m_triggers->SetControlExpression(1, "`W`"); // R
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GCPad::GetMicButton() const
|
bool GCPad::GetMicButton() const
|
||||||
|
|
Loading…
Reference in New Issue