Zero window size fix (OS Windows)
This commit is contained in:
@@ -60,7 +60,8 @@ bool Window::isFocused()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void window_size_callback(GLFWwindow*, int width, int height) {
|
void window_size_callback(GLFWwindow*, int width, int height) {
|
||||||
if (Window::isFocused() && width && height) {
|
if (width && height) {
|
||||||
|
if (Window::isFocused()) {
|
||||||
glViewport(0, 0, width, height);
|
glViewport(0, 0, width, height);
|
||||||
Window::width = width;
|
Window::width = width;
|
||||||
Window::height = height;
|
Window::height = height;
|
||||||
@@ -70,6 +71,7 @@ void window_size_callback(GLFWwindow*, int width, int height) {
|
|||||||
Window::getSettings()->width = width;
|
Window::getSettings()->width = width;
|
||||||
Window::getSettings()->height = height;
|
Window::getSettings()->height = height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Window::resetScissor();
|
Window::resetScissor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user