mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Fix loss of window size and position, if it was maximized.
This commit is contained in:
parent
3b241baa52
commit
28c176d3aa
@ -348,14 +348,16 @@ int main( int argc, char** argv )
|
||||
FILE* f = fopen( winPosFile.c_str(), "wb" );
|
||||
if( f )
|
||||
{
|
||||
glfwGetWindowPos( window, &x, &y );
|
||||
glfwGetWindowSize( window, &w, &h );
|
||||
#ifdef GLFW_MAXIMIZED
|
||||
uint32_t maximized = glfwGetWindowAttrib( window, GLFW_MAXIMIZED );
|
||||
if( maximized ) glfwRestoreWindow( window );
|
||||
#else
|
||||
uint32_t maximized = 0;
|
||||
#endif
|
||||
|
||||
glfwGetWindowPos( window, &x, &y );
|
||||
glfwGetWindowSize( window, &w, &h );
|
||||
|
||||
uint32_t data[5] = { uint32_t( x ), uint32_t( y ), uint32_t( w ), uint32_t( h ), maximized };
|
||||
fwrite( data, 1, sizeof( data ), f );
|
||||
fclose( f );
|
||||
|
Loading…
Reference in New Issue
Block a user