From 7c7e32d49ec674b41ba3865625f3d1d3fa0aa30e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 2 Jun 2019 18:03:56 +0200 Subject: [PATCH] Set window icon. --- profiler/src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index 4587ec9e..369e2493 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -38,6 +38,7 @@ #include "Arimo.hpp" #include "Cousine.hpp" #include "FontAwesomeSolid.hpp" +#include "icon.hpp" static void glfw_error_callback(int error, const char* description) { @@ -162,6 +163,15 @@ int main( int argc, char** argv ) #endif GLFWwindow* window = glfwCreateWindow( w, h, title, NULL, NULL); if( !window ) return 1; + + { + GLFWimage icon; + int comp; + icon.pixels = stbi_load_from_memory( (const stbi_uc*)Icon_data, Icon_size, &icon.width, &icon.height, nullptr, 4 ); + glfwSetWindowIcon( window, 1, &icon ); + free( icon.pixels ); + } + glfwSetWindowPos( window, x, y ); #ifdef GLFW_MAXIMIZED if( maximize ) glfwMaximizeWindow( window );