summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/icon.bmpbin0 -> 16522 bytes
-rw-r--r--main.cpp6
2 files changed, 6 insertions, 0 deletions
diff --git a/assets/icon.bmp b/assets/icon.bmp
new file mode 100644
index 0000000..1c487a2
--- /dev/null
+++ b/assets/icon.bmp
Binary files differ
diff --git a/main.cpp b/main.cpp
index 6c61afe..02584b9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -219,6 +219,12 @@ int main(void) {
die("%s", SDL_GetError());
}
+ { // set icon
+ SDL_Surface *icon = SDL_LoadBMP("assets/icon.bmp");
+ SDL_SetWindowIcon(window, icon);
+ SDL_FreeSurface(icon);
+ }
+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GLContext glctx = SDL_GL_CreateContext(window);