mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Set window icon.
This commit is contained in:
parent
9e3cf3d387
commit
7c7e32d49e
@ -38,6 +38,7 @@
|
|||||||
#include "Arimo.hpp"
|
#include "Arimo.hpp"
|
||||||
#include "Cousine.hpp"
|
#include "Cousine.hpp"
|
||||||
#include "FontAwesomeSolid.hpp"
|
#include "FontAwesomeSolid.hpp"
|
||||||
|
#include "icon.hpp"
|
||||||
|
|
||||||
static void glfw_error_callback(int error, const char* description)
|
static void glfw_error_callback(int error, const char* description)
|
||||||
{
|
{
|
||||||
@ -162,6 +163,15 @@ int main( int argc, char** argv )
|
|||||||
#endif
|
#endif
|
||||||
GLFWwindow* window = glfwCreateWindow( w, h, title, NULL, NULL);
|
GLFWwindow* window = glfwCreateWindow( w, h, title, NULL, NULL);
|
||||||
if( !window ) return 1;
|
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 );
|
glfwSetWindowPos( window, x, y );
|
||||||
#ifdef GLFW_MAXIMIZED
|
#ifdef GLFW_MAXIMIZED
|
||||||
if( maximize ) glfwMaximizeWindow( window );
|
if( maximize ) glfwMaximizeWindow( window );
|
||||||
|
Loading…
Reference in New Issue
Block a user