Change default Window state to windowed

This commit is contained in:
Rick van Vonderen
2019-12-20 00:20:37 +01:00
parent ec7e3de28b
commit cd2f38f360
+10 -11
View File
@@ -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);
}