瀏覽代碼

fix example

- fix gamepad axis query in example broken by db4585b Improved gamepad support
Gordon McShane 9 年之前
父節點
當前提交
c0983f3400
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/core_input_gamepad.c

+ 2 - 1
examples/core_input_gamepad.c

@@ -36,7 +36,8 @@ int main()
         //----------------------------------------------------------------------------------
         if (IsGamepadAvailable(GAMEPAD_PLAYER1))
         {
-            gamepadMovement = GetGamepadMovement(GAMEPAD_PLAYER1);
+            gamepadMovement.x = GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_X);
+            gamepadMovement.y = GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_Y);
 
             ballPosition.x += gamepadMovement.x;
             ballPosition.y -= gamepadMovement.y;