Selaa lähdekoodia

example core_input_gamepad.c: fix hardcoded gamepad 0

pull/5068/head
lepasona 2 kuukautta sitten
committed by GitHub
vanhempi
commit
b230720842
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. +3
    -3
      examples/core/core_input_gamepad.c

+ 3
- 3
examples/core/core_input_gamepad.c Näytä tiedosto

@ -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);

Ladataan…
Peruuta
Tallenna