Quellcode durchsuchen

example core_input_gamepad.c: fix hardcoded gamepad 0

pull/5068/head
lepasona vor 2 Monaten
committed von GitHub
Ursprung
Commit
b230720842
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: B5690EEEBB952194
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. +3
    -3
      examples/core/core_input_gamepad.c

+ 3
- 3
examples/core/core_input_gamepad.c Datei anzeigen

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

Laden…
Abbrechen
Speichern