mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Added stubs, implemented on Linux and Cocoa.
This commit is contained in:
@@ -126,3 +126,25 @@ GLFWAPI int glfwGetJoystickButtons(int joy,
|
||||
return _glfwPlatformGetJoystickButtons(joy, buttons, numbuttons);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get joystick name
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI const char* glfwGetJoystickName(int joy)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (joy < 0 || joy > GLFW_JOYSTICK_LAST)
|
||||
{
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return _glfwPlatformGetJoystickName(joy);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user