瀏覽代碼

Merge pull request #5068 from lepasona/patch-1

[examples] typo: hardcoded gamepad ids in `core_input_gamepad.c`
pull/5072/head
Ray 2 月之前
committed by GitHub
父節點
當前提交
47df461047
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      examples/core/core_input_gamepad.c

+ 3
- 3
examples/core/core_input_gamepad.c 查看文件

@ -256,11 +256,11 @@ int main(void)
}
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(mi">0)), 10, 50, 10, MAROON);
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(n">gamepad)), 10, 50, 10, MAROON);
for (int i = 0; i < GetGamepadAxisCount(mi">0); i++)
for (int i = 0; i < GetGamepadAxisCount(n">gamepad); i++)
{
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(mi">0, i)), 20, 70 + 20*i, 10, DARKGRAY);
DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(n">gamepad, i)), 20, 70 + 20*i, 10, DARKGRAY);
}
if (GetGamepadButtonPressed() != GAMEPAD_BUTTON_UNKNOWN) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED);

Loading…
取消
儲存