mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Set window icon.
This commit is contained in:
parent
9e3cf3d387
commit
7c7e32d49e
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user