[rcore] Adds implementation to SetGamepadVibration()
on PLATFORM_WEB
and updates it on PLATFORM_DESKTOP_SDL
to handle duration (#4410)
* Updates SetGamepadVibration() * Handle MAX_GAMEPAD_VIBRATION_TIME * Revert low/high parameters back to left/rightMotor * Fix missin semicolon * Convert duration to seconds * Add SetGamepadVibration() implementation to PLATFORM_WEB
This commit is contained in:
parent
ae150e9640
commit
f8f6aa0907
6 changed files with 41 additions and 16 deletions
|
@ -610,7 +610,7 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ int InitPlatform(void)
|
|||
|
||||
drmModeConnector *con = drmModeGetConnector(platform.fd, res->connectors[i]);
|
||||
TRACELOG(LOG_TRACE, "DISPLAY: Connector modes detected: %i", con->count_modes);
|
||||
|
||||
|
||||
// In certain cases the status of the conneciton is reported as UKNOWN, but it is still connected.
|
||||
// This might be a hardware or software limitation like on Raspberry Pi Zero with composite output.
|
||||
if (((con->connection == DRM_MODE_CONNECTED) || (con->connection == DRM_MODE_UNKNOWNCONNECTION)) && (con->encoder_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue