SetGamepadVibration() added

This commit is contained in:
JupiterRider 2024-11-23 20:41:25 +01:00
parent 7275646a1d
commit 972563ca1f
2 changed files with 12 additions and 0 deletions

View file

@ -1112,6 +1112,11 @@ func SetGamepadMappings(mappings string) int32 {
return v
}
// SetGamepadVibration - Set gamepad vibration for both motors (duration in seconds)
func SetGamepadVibration(gamepad int32, leftMotor, rightMotor, duration float32) {
C.SetGamepadVibration(C.int(gamepad), C.float(leftMotor), C.float(rightMotor), C.float(duration))
}
// IsMouseButtonPressed - Detect if a mouse button has been pressed once
func IsMouseButtonPressed(button MouseButton) bool {
cbutton := (C.int)(button)