mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Zero window size fix (OS Windows)
This commit is contained in:
parent
100f87056c
commit
9cf76f2d45
1 changed files with 10 additions and 8 deletions
|
|
@ -60,15 +60,17 @@ bool Window::isFocused()
|
|||
}
|
||||
|
||||
void window_size_callback(GLFWwindow*, int width, int height) {
|
||||
if (Window::isFocused() && width && height) {
|
||||
glViewport(0, 0, width, height);
|
||||
Window::width = width;
|
||||
Window::height = height;
|
||||
}
|
||||
if (width && height) {
|
||||
if (Window::isFocused()) {
|
||||
glViewport(0, 0, width, height);
|
||||
Window::width = width;
|
||||
Window::height = height;
|
||||
}
|
||||
|
||||
if (!Window::isFullscreen() && !Window::isMaximized()) {
|
||||
Window::getSettings()->width = width;
|
||||
Window::getSettings()->height = height;
|
||||
if (!Window::isFullscreen() && !Window::isMaximized()) {
|
||||
Window::getSettings()->width = width;
|
||||
Window::getSettings()->height = height;
|
||||
}
|
||||
}
|
||||
Window::resetScissor();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue