From 8c0ca39d2ab584f8457156b9881bf5c42d7e260d Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 5 Oct 2023 23:00:45 +0200 Subject: [PATCH] Enable the window icon on Linux --- src/blupi.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/blupi.cxx b/src/blupi.cxx index c91a521..b48f3e0 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -821,11 +821,12 @@ DoInit (int argc, char * argv[], bool & exit) return EXIT_FAILURE; } -#if 0 - auto icon = IMG_Load ((GetShareDir () + "icons/hicolor/256x256/apps/blupi.png").c_str ()); +#ifdef __linux__ + auto icon = IMG_Load ( + (GetShareDir () + "icons/hicolor/256x256/apps/blupi.png").c_str ()); SDL_SetWindowIcon (g_window, icon); SDL_FreeSurface (icon); -#endif /* 0 */ +#endif /* __linux__ */ g_renderer = SDL_CreateRenderer ( g_window, -1, g_rendererType | SDL_RENDERER_TARGETTEXTURE);