Add GetGamepadGUID for PLATFORM_DESKTOP_GLFW
This commit is contained in:
parent
d46ba9a671
commit
730371aafb
|
|
@ -624,6 +624,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1084,6 +1084,12 @@ int SetGamepadMappings(const char *mappings)
|
|||
return glfwUpdateGamepadMappings(mappings);
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
return glfwGetJoystickGUID(gamepad);
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -789,6 +789,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1236,6 +1236,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return SDL_GameControllerAddMapping(mappings);
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -619,6 +619,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -381,6 +381,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -162,13 +162,13 @@ bool WindowShouldClose(void)
|
|||
// REF: https://emscripten.org/docs/porting/asyncify.html
|
||||
|
||||
// WindowShouldClose() is not called on a web-ready raylib application if using emscripten_set_main_loop()
|
||||
// and encapsulating one frame execution on a UpdateDrawFrame() function,
|
||||
// and encapsulating one frame execution on a UpdateDrawFrame() function,
|
||||
// allowing the browser to manage execution asynchronously
|
||||
|
||||
// Optionally we can manage the time we give-control-back-to-browser if required,
|
||||
// but it seems below line could generate stuttering on some browsers
|
||||
emscripten_sleep(12);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -914,6 +914,13 @@ int SetGamepadMappings(const char *mappings)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Get gamepad GUID
|
||||
const char *GetGamepadGUID(int gamepad)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetGamepadGUID() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1195,6 +1195,7 @@ RLAPI int GetGamepadButtonPressed(void); // Get the last ga
|
|||
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 int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||
RLAPI const char *GetGamepadGUID(int gamepad); // Get gamepad GUID
|
||||
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
|
||||
|
||||
// Input-related functions: mouse
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user