From 102ea6734c301cb6062a45d1bcf67dfc948cfb1c Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sun, 26 Feb 2017 17:46:49 +0100 Subject: [PATCH] Add icon to the window --- CMakeLists.txt | 1 + resources/icon/planetblupi.png | Bin 0 -> 585 bytes src/blupi.cxx | 5 +++++ 3 files changed, 6 insertions(+) create mode 100644 resources/icon/planetblupi.png 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 0000000000000000000000000000000000000000..13e353b9a64b662a93c06bc733b215a03009dd32 GIT binary patch literal 585 zcmV-P0=E5$P)Xm4pBQ0oF-G zK~z}7tyj^pgdhyu@UD>8iRsMH$?N1oCw9X7P)-EIaGDwBPGrbt6P5@JnutUZiRHYi zHs>F;%|QeZMbh{H+UCbVxIqXRn0zju7pSTk#E*5Ms>Wsc12gb`14QfmJOd#B%==iD zU#P0L>`PYX)5M==@1SqW9ijVClJ$g)R$p7QHHCp6hqs?@rEs&+n4j-|Ia0iV*5LNT6Ea z&Wu^1%23r<>cZe=g z%aOi_dh61c)2){5N)4ZAOuxR2dPSOpyej5PB@96insBCY)^)=S)EXd7VcOS8cU@`! Xa27?oIm-%s00000NkvXXu0mjfBXtHf literal 0 HcmV?d00001 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) {