diff --git a/CMakeLists.txt b/CMakeLists.txt index 898dba4..67dfb1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,7 @@ install (DIRECTORY resources/image DESTINATION share/planetblupi) install (DIRECTORY resources/movie DESTINATION share/planetblupi) install (DIRECTORY resources/sound DESTINATION share/planetblupi) install (DIRECTORY resources/music DESTINATION share/planetblupi) +install (FILES resources/icon/planetblupi.png DESTINATION share/planetblupi) ######### ## Deploy diff --git a/resources/icon/planetblupi.png b/resources/icon/planetblupi.png new file mode 100644 index 0000000..13e353b Binary files /dev/null and b/resources/icon/planetblupi.png differ diff --git a/src/blupi.cxx b/src/blupi.cxx index 44bc9db..e3b4887 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -1,6 +1,7 @@ #include #include +#include #include "blupi.h" #include "def.h" @@ -443,6 +444,10 @@ static bool DoInit (Sint32 argc, char *argv[]) return false; } + auto icon = IMG_Load ((GetBaseDir () + "planetblupi.png").c_str ()); + SDL_SetWindowIcon (g_window, icon); + SDL_FreeSurface (icon); + g_renderer = SDL_CreateRenderer (g_window, -1, g_rendererType | SDL_RENDERER_TARGETTEXTURE); if (!g_renderer) {