Commit e049aa74 authored by Jasmin68k's avatar Jasmin68k Committed by Gargaj
Browse files

Prevent fullscreen window minimize on focus loss

parent 5d0a2b1a
......@@ -249,6 +249,9 @@ namespace Renderer
// TODO: change in case of resize support
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
// Prevent fullscreen window minimize on focus loss
glfwWindowHint(GLFW_AUTO_ICONIFY, GL_FALSE);
GLFWmonitor *monitor = settings->windowMode == RENDERER_WINDOWMODE_FULLSCREEN ? glfwGetPrimaryMonitor() : NULL;
mWindow = glfwCreateWindow(nWidth, nHeight, "BONZOMATIC - GLFW edition", monitor, NULL);
......@@ -314,7 +317,7 @@ namespace Renderer
glGenBuffers( 1, &glhFullscreenQuadVB );
glBindBuffer( GL_ARRAY_BUFFER, glhFullscreenQuadVB );
glBufferData( GL_ARRAY_BUFFER, sizeof(float) * 5 * 4, pFullscreenQuadVertices, GL_STATIC_DRAW );
glBindBuffer( GL_ARRAY_BUFFER, 0 );
glBindBuffer( GL_ARRAY_BUFFER, 0 );
glGenVertexArrays(1, &glhFullscreenQuadVA);
......@@ -430,7 +433,7 @@ namespace Renderer
glBindBuffer(GL_PIXEL_PACK_BUFFER, pbo[1]);
glBufferData(GL_PIXEL_PACK_BUFFER, nWidth * nHeight * sizeof(unsigned int), NULL, GL_STREAM_READ);
//unbind buffers for now
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
glViewport(0, 0, nWidth, nHeight);
......@@ -620,7 +623,7 @@ namespace Renderer
if (position >= 0)
glDisableVertexAttribArray( position );
glUseProgram(0);
glUseProgram(0);
}
bool ReloadShader( const char * szShaderCode, int nShaderCodeSize, char * szErrorBuffer, int nErrorBufferSize )
......@@ -959,7 +962,7 @@ namespace Renderer
glDisableVertexAttribArray( color );
glDisableVertexAttribArray( position );
glUseProgram(0);
glUseProgram(0);
glDisable(GL_BLEND);
glDisable(GL_SCISSOR_TEST);
......@@ -988,7 +991,7 @@ namespace Renderer
}
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
}
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment