mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
don't fail on missing icon file
This commit is contained in:
parent
db0d8da708
commit
deb38e778c
1 changed files with 6 additions and 3 deletions
|
@ -303,9 +303,12 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ALLEGRO_BITMAP* icon = al_load_bitmap(GetDataFilePath(game, GetGameName(game, "icons/%s.png")));
|
||||
al_set_display_icon(game->display, icon);
|
||||
al_destroy_bitmap(icon);
|
||||
const char* iconpath = FindDataFilePath(game, GetGameName(game, "icons/%s.png"));
|
||||
if (iconpath) {
|
||||
ALLEGRO_BITMAP* icon = al_load_bitmap(iconpath);
|
||||
al_set_display_icon(game->display, icon);
|
||||
al_destroy_bitmap(icon);
|
||||
}
|
||||
|
||||
if (game->config.fullscreen) { al_hide_mouse_cursor(game->display); }
|
||||
al_inhibit_screensaver(true);
|
||||
|
|
Loading…
Reference in a new issue