From cd2f38f3606ebafffdaabc0161ea3298d2888549 Mon Sep 17 00:00:00 2001 From: Rick van Vonderen <0945444@hr.nl> Date: Fri, 20 Dec 2019 00:20:37 +0100 Subject: [PATCH] Change default Window state to windowed --- inferno/src/inferno/window.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/inferno/src/inferno/window.cpp b/inferno/src/inferno/window.cpp index 689385d..23a6547 100644 --- a/inferno/src/inferno/window.cpp +++ b/inferno/src/inferno/window.cpp @@ -185,23 +185,22 @@ namespace Inferno { const char* fullscreen = m_windowProperties.fullscreen; const GLFWvidmode* mode = glfwGetVideoMode(monitor); - if (strcmp(fullscreen, "windowed") == 0) { + if (strcmp(fullscreen, "fullscreen") == 0) { + refresh = mode->refreshRate; + } + else if (strcmp(fullscreen, "borderless") == 0) { + width = mode->width; + height = mode->height; + refresh = mode->refreshRate; + } + // Default window state is windowed + else { monitor = nullptr; // Put window in the center of the monitor xPos = (mode->width - width) / 2; yPos = (mode->height - height) / 2; } - if (strcmp(fullscreen, "fullscreen") == 0) { - refresh = mode->refreshRate; - } - - if (strcmp(fullscreen, "borderless") == 0) { - width = mode->width; - height = mode->height; - refresh = mode->refreshRate; - } - glfwSetWindowMonitor(m_window, monitor, xPos, yPos, width, height, refresh); }