Revert low/high parameters back to left/rightMotor

This commit is contained in:
asdqwe 2024-10-21 14:37:57 -03:00
commit 0d3f137e52
5 changed files with 11 additions and 11 deletions

View file

@ -615,7 +615,7 @@ int SetGamepadMappings(const char *mappings)
}
// Set gamepad vibration
void SetGamepadVibration(int gamepad, float low, float high, int duration)
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration)
{
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
}

View file

@ -1060,7 +1060,7 @@ int SetGamepadMappings(const char *mappings)
}
// Set gamepad vibration
void SetGamepadVibration(int gamepad, float low, float high, int duration)
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration)
{
TRACELOG(LOG_WARNING, "GamepadSetVibration() not available on target platform");
}

View file

@ -953,17 +953,17 @@ int SetGamepadMappings(const char *mappings)
}
// Set gamepad vibration
void SetGamepadVibration(int gamepad, float low, float high, int duration)
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration)
{
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (duration > 0))
{
if (low < 0.0f) low = 0.0f;
if (low > 1.0f) low = 1.0f;
if (high < 0.0f) high = 0.0f;
if (high > 1.0f) high = 1.0f;
if (leftMotor < 0.0f) leftMotor = 0.0f;
if (leftMotor > 1.0f) leftMotor = 1.0f;
if (rightMotor < 0.0f) rightMotor = 0.0f;
if (rightMotor > 1.0f) rightMotor = 1.0f;
if (duration > MAX_GAMEPAD_VIBRATION_TIME) duration = MAX_GAMEPAD_VIBRATION_TIME;
SDL_GameControllerRumble(platform.gamepad[gamepad], (Uint16)(low*65535.0f), (Uint16)(high*65535.0f), (Uint32)duration);
SDL_GameControllerRumble(platform.gamepad[gamepad], (Uint16)(leftMotor*65535.0f), (Uint16)(rightMotor*65535.0f), (Uint32)duration);
}
}

View file

@ -610,7 +610,7 @@ int SetGamepadMappings(const char *mappings)
}
// Set gamepad vibration
void SetGamepadVibration(int gamepad, float low, float high, int duration)
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration)
{
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
}

View file

@ -892,7 +892,7 @@ int SetGamepadMappings(const char *mappings)
}
// Set gamepad vibration
void SetGamepadVibration(int gamepad, float low, float high, int duration)
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration)
{
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
}