Update RingRayLib - raylib.c - Add Function : float GetGamepadAxisMovement(int gamepad, int axis)
@@ -1262,6 +1262,24 @@ RING_FUNC(ring_GetGamepadAxisCount)
RING_API_RETNUMBER(GetGamepadAxisCount( (int ) RING_API_GETNUMBER(1)));
}
+
+RING_FUNC(ring_GetGamepadAxisMovement)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(GetGamepadAxisMovement( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1357,4 +1375,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("isgamepadbuttonup",ring_IsGamepadButtonUp);
ring_vm_funcregister("getgamepadbuttonpressed",ring_GetGamepadButtonPressed);
ring_vm_funcregister("getgamepadaxiscount",ring_GetGamepadAxisCount);
+ ring_vm_funcregister("getgamepadaxismovement",ring_GetGamepadAxisMovement);
}
