소스 검색

example core_input_gamepad.c: fix hardcoded gamepad 0

pull/5068/head
lepasona 6 달 전
committed by GitHub
부모
커밋
b230720842
No known key found for this signature in database 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);

불러오는 중...
취소
저장