mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
init: list connected joystick data in debug output
This commit is contained in:
parent
943c4fb77b
commit
b5b938ef28
1 changed files with 14 additions and 0 deletions
|
@ -291,6 +291,16 @@ 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:");
|
||||
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));
|
||||
PrintConsole(game, " - buttons: %d", al_get_joystick_num_buttons(joystick));
|
||||
for (int j = 0; j < al_get_joystick_num_sticks(joystick); j++) {
|
||||
PrintConsole(game, " - stick %d: %d axes", j, al_get_joystick_num_axes(joystick, j));
|
||||
}
|
||||
}
|
||||
|
||||
if (!al_get_display_option(game->display, ALLEGRO_COMPATIBLE_DISPLAY)) {
|
||||
al_destroy_display(game->display);
|
||||
fprintf(stderr, "Created display is Allegro incompatible!\n");
|
||||
|
@ -362,6 +372,8 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
__libsuperderpy_register_gamestate(NULL, NULL, game);
|
||||
#endif
|
||||
|
||||
PrintConsole(game, "Engine initialized.");
|
||||
|
||||
return game;
|
||||
}
|
||||
|
||||
|
@ -447,6 +459,8 @@ SYMBOL_EXPORT int libsuperderpy_start(struct Game* game) {
|
|||
io->FontGlobalScale = strtod(GetConfigOptionDefault(game, "SuperDerpy", "scale", "1"), NULL);
|
||||
#endif
|
||||
|
||||
PrintConsole(game, "Engine started.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue