Skip to content

Commit

Permalink
Fix for broken rendering after minimizing window in Demo on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruxo committed May 20, 2014
1 parent 4f879d0 commit 45de1c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Demo/platform/port_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ static void window_refresh_callback(GLFWwindow *window)

backend->has_pending_update = false;

// Bail out if we get here with invalid dimensions.
// This may happen when minimizing windows (GLFW 3.0.4, Windows 8.1).
if (backend->GetWidth() == 0 || backend->GetHeight() == 0)
return;

backend->m_application->RenderFrame(backend->GetWidth(), backend->GetHeight());

glfwSwapBuffers(window);
Expand Down

0 comments on commit 45de1c3

Please sign in to comment.