Zero window size fix (OS Windows)
This commit is contained in:
+10
-8
@@ -60,15 +60,17 @@ 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) {
|
||||||
glViewport(0, 0, width, height);
|
if (Window::isFocused()) {
|
||||||
Window::width = width;
|
glViewport(0, 0, width, height);
|
||||||
Window::height = height;
|
Window::width = width;
|
||||||
}
|
Window::height = height;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Window::isFullscreen() && !Window::isMaximized()) {
|
if (!Window::isFullscreen() && !Window::isMaximized()) {
|
||||||
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