libsuperderpy_init: Make "connected joysticks" log better when there's none

This commit is contained in:
Sebastian Krzyszkowiak 2021-07-24 03:25:11 +02:00
parent 1ed4c73025
commit 8a9e838c9f
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -317,7 +317,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
PrintConsole(game, "NPOT bitmaps: %d", al_get_display_option(game->display, ALLEGRO_SUPPORT_NPOT_BITMAP));
PrintConsole(game, "Separate alpha blender: %d", al_get_display_option(game->display, ALLEGRO_SUPPORT_SEPARATE_ALPHA));
PrintConsole(game, "Connected joysticks:");
PrintConsole(game, "Connected joysticks:%s", al_get_num_joysticks() ? "" : " [none]");
for (int i = 0; i < al_get_num_joysticks(); i++) {
ALLEGRO_JOYSTICK* joystick = al_get_joystick(i);
PrintConsole(game, " - %d: %s", i, al_get_joystick_name(joystick));