From 0f72461c3eb7980fc6f449f1947c6eee4aff6d17 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 31 Aug 2018 20:05:40 +0200 Subject: [PATCH] Fix for GLFW 3.1. --- profiler/src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index 4785771f..a12524a4 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -103,7 +103,9 @@ int main( int argc, char** argv ) GLFWwindow* window = glfwCreateWindow( w, h, title, NULL, NULL); if( !window ) return 1; glfwSetWindowPos( window, x, y ); +#ifdef GLFW_MAXIMIZED if( maximize ) glfwMaximizeWindow( window ); +#endif s_glfwWindow = window; glfwMakeContextCurrent(window); glfwSwapInterval(1); // Enable vsync @@ -348,7 +350,11 @@ int main( int argc, char** argv ) { glfwGetWindowPos( window, &x, &y ); glfwGetWindowSize( window, &w, &h ); +#ifdef GLFW_MAXIMIZED uint32_t maximized = glfwGetWindowAttrib( window, GLFW_MAXIMIZED ); +#else + uint32_t maximized = 0; +#endif uint32_t data[5] = { uint32_t( x ), uint32_t( y ), uint32_t( w ), uint32_t( h ), maximized }; fwrite( data, 1, sizeof( data ), f );