Move GetGamepadAxisCount from rcore
This commit is contained in:
parent
c89d178e8d
commit
6809f06b55
12
src/rcore.c
12
src/rcore.c
|
|
@ -1961,18 +1961,6 @@ bool IsGamepadAvailable(int gamepad)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get gamepad axis count
|
|
||||||
int GetGamepadAxisCount(int gamepad)
|
|
||||||
{
|
|
||||||
#if defined(PLATFORM_DRM)
|
|
||||||
int axisCount = 0;
|
|
||||||
if (CORE.Input.Gamepad.ready[gamepad]) ioctl(CORE.Input.Gamepad.streamId[gamepad], JSIOCGAXES, &axisCount);
|
|
||||||
CORE.Input.Gamepad.axisCount = axisCount;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return CORE.Input.Gamepad.axisCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get axis movement vector for a gamepad
|
// Get axis movement vector for a gamepad
|
||||||
float GetGamepadAxisMovement(int gamepad, int axis)
|
float GetGamepadAxisMovement(int gamepad, int axis)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1640,3 +1640,10 @@ int GetMonitorPhysicalWidth(int monitor)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get gamepad axis count
|
||||||
|
int GetGamepadAxisCount(int gamepad)
|
||||||
|
{
|
||||||
|
return CORE.Input.Gamepad.axisCount;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1524,3 +1524,10 @@ int GetMonitorPhysicalWidth(int monitor)
|
||||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get gamepad axis count
|
||||||
|
int GetGamepadAxisCount(int gamepad)
|
||||||
|
{
|
||||||
|
return CORE.Input.Gamepad.axisCount;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -962,3 +962,13 @@ int GetMonitorPhysicalWidth(int monitor)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get gamepad axis count
|
||||||
|
int GetGamepadAxisCount(int gamepad)
|
||||||
|
{
|
||||||
|
int axisCount = 0;
|
||||||
|
if (CORE.Input.Gamepad.ready[gamepad]) ioctl(CORE.Input.Gamepad.streamId[gamepad], JSIOCGAXES, &axisCount);
|
||||||
|
CORE.Input.Gamepad.axisCount = axisCount;
|
||||||
|
return CORE.Input.Gamepad.axisCount;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1562,3 +1562,10 @@ int GetMonitorPhysicalWidth(int monitor)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get gamepad axis count
|
||||||
|
int GetGamepadAxisCount(int gamepad)
|
||||||
|
{
|
||||||
|
return CORE.Input.Gamepad.axisCount;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user