mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Add icon to the window
This commit is contained in:
parent
f7e4c2c4df
commit
102ea6734c
@ -141,6 +141,7 @@ install (DIRECTORY resources/image DESTINATION share/planetblupi)
|
|||||||
install (DIRECTORY resources/movie DESTINATION share/planetblupi)
|
install (DIRECTORY resources/movie DESTINATION share/planetblupi)
|
||||||
install (DIRECTORY resources/sound DESTINATION share/planetblupi)
|
install (DIRECTORY resources/sound DESTINATION share/planetblupi)
|
||||||
install (DIRECTORY resources/music DESTINATION share/planetblupi)
|
install (DIRECTORY resources/music DESTINATION share/planetblupi)
|
||||||
|
install (FILES resources/icon/planetblupi.png DESTINATION share/planetblupi)
|
||||||
|
|
||||||
#########
|
#########
|
||||||
## Deploy
|
## Deploy
|
||||||
|
BIN
resources/icon/planetblupi.png
Normal file
BIN
resources/icon/planetblupi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 585 B |
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <SDL2/SDL_image.h>
|
||||||
|
|
||||||
#include "blupi.h"
|
#include "blupi.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
@ -443,6 +444,10 @@ static bool DoInit (Sint32 argc, char *argv[])
|
|||||||
return false;
|
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);
|
g_renderer = SDL_CreateRenderer (g_window, -1, g_rendererType | SDL_RENDERER_TARGETTEXTURE);
|
||||||
if (!g_renderer)
|
if (!g_renderer)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user