Revert low/high parameters back to left/rightMotor
This commit is contained in:
parent
87e6932986
commit
0d3f137e52
|
|
@ -615,7 +615,7 @@ int SetGamepadMappings(const char *mappings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set gamepad vibration
|
// 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");
|
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1060,7 +1060,7 @@ int SetGamepadMappings(const char *mappings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set gamepad vibration
|
// 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");
|
TRACELOG(LOG_WARNING, "GamepadSetVibration() not available on target platform");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -953,17 +953,17 @@ int SetGamepadMappings(const char *mappings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set gamepad vibration
|
// 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 ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (duration > 0))
|
||||||
{
|
{
|
||||||
if (low < 0.0f) low = 0.0f;
|
if (leftMotor < 0.0f) leftMotor = 0.0f;
|
||||||
if (low > 1.0f) low = 1.0f;
|
if (leftMotor > 1.0f) leftMotor = 1.0f;
|
||||||
if (high < 0.0f) high = 0.0f;
|
if (rightMotor < 0.0f) rightMotor = 0.0f;
|
||||||
if (high > 1.0f) high = 1.0f;
|
if (rightMotor > 1.0f) rightMotor = 1.0f;
|
||||||
if (duration > MAX_GAMEPAD_VIBRATION_TIME) duration = MAX_GAMEPAD_VIBRATION_TIME;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -610,7 +610,7 @@ int SetGamepadMappings(const char *mappings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set gamepad vibration
|
// 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");
|
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -892,7 +892,7 @@ int SetGamepadMappings(const char *mappings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set gamepad vibration
|
// 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");
|
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1184,7 +1184,7 @@ RLAPI int GetGamepadButtonPressed(void);
|
||||||
RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
||||||
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
||||||
RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||||
RLAPI void SetGamepadVibration(int gamepad, float low, float high, int duration); // Set gamepad vibration for both motors (duration in ms)
|
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, int duration) // Set gamepad vibration for both motors (duration in ms)
|
||||||
|
|
||||||
// Input-related functions: mouse
|
// Input-related functions: mouse
|
||||||
RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user