mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-17 11:34:18 +01:00
USB: ASCII Trance Vib emulation
This commit is contained in:
1 parent
f5320e201e
commit
edd39dfe08
16 files changed
+429
No files matched your search
@@ -868,6 +868,19 @@ void InputManager::AddUSBBindings(SettingsInterface& si, u32 port)
|
||||
}
|
||||
break;
|
||||
|
||||
case InputBindingInfo::Type::Motor:
|
||||
{
|
||||
const std::vector<std::string> bindings(si.GetStringList(section.c_str(), bind_name.c_str()));
|
||||
for (const std::string& binding : bindings)
|
||||
{
|
||||
PadVibrationBinding vib;
|
||||
vib.pad_index = Pad::NUM_CONTROLLER_PORTS + port;
|
||||
ParseBindingAndGetSource(binding, &vib.motors[0].binding, &vib.motors[0].source);
|
||||
s_pad_vibration_array.push_back(std::move(vib));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1219,6 +1232,11 @@ void InputManager::OnInputDeviceDisconnected(const InputBindingKey key, const st
|
||||
// Vibration
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
void InputManager::SetUSBVibrationIntensity(u32 port, float large_or_single_motor_intensity, float small_motor_intensity)
|
||||
{
|
||||
SetPadVibrationIntensity(Pad::NUM_CONTROLLER_PORTS + port, large_or_single_motor_intensity, small_motor_intensity);
|
||||
}
|
||||
|
||||
void InputManager::SetPadVibrationIntensity(u32 pad_index, float large_or_single_motor_intensity, float small_motor_intensity)
|
||||
{
|
||||
for (PadVibrationBinding& pad : s_pad_vibration_array)
|
||||
|
||||
Reference in new issue
Block a user