export libsuperderpy's git revision and print on initializing

This commit is contained in:
Sebastian Krzyszkowiak 2018-08-04 18:25:30 +02:00
parent 0c5fee3cbb
commit 51d9fad1d6
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
2 changed files with 11 additions and 3 deletions

View file

@ -314,6 +314,14 @@ endif()
endif(ANDROID)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/libsuperderpy
OUTPUT_VARIABLE LIBSUPERDERPY_GIT_REV
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_definitions(-DLIBSUPERDERPY_GIT_REV="${LIBSUPERDERPY_GIT_REV}")
set(LIBSUPERDERPY_CONFIG_INCLUDED 1)
endif (NOT LIBSUPERDERPY_CONFIG_INCLUDED)

View file

@ -197,9 +197,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
al_android_set_apk_fs_interface();
#endif
SetupViewport(game, viewport);
PrintConsole(game, "libsuperderpy 2");
PrintConsole(game, "libsuperderpy 2 (rev " LIBSUPERDERPY_GIT_REV ")");
PrintConsole(game, "OpenGL%s (%08X)", al_get_opengl_variant() == ALLEGRO_OPENGL_ES ? " ES" : "", al_get_opengl_version());
PrintConsole(game, "Max bitmap size: %d", al_get_display_option(game->display, ALLEGRO_MAX_BITMAP_SIZE));
@ -228,6 +226,8 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
if (game->config.fullscreen) { al_hide_mouse_cursor(game->display); }
al_inhibit_screensaver(true);
SetupViewport(game, viewport);
al_add_new_bitmap_flag(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
game->_priv.gamestates = NULL;