From 338b9b8a7f24fdcc7c8ed82ab26dc6437d42aa4a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 7 Aug 2014 04:45:14 +0200 Subject: [PATCH] GL: Fix switch from different resolution fullscreen to borderless display --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 65f219fc7..4e08884b0 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1304,6 +1304,9 @@ BOOL CALLBACK CDriverGL::monitorEnumProcFullscreen(HMONITOR hMonitor, HDC, LPREC { nldebug("3D: Remapping '%s' to '%s'", p->DeviceName, monitorInfo.szDevice); nldebug("3D: Found requested monitor at %i, %i", monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top); + p->Driver->_CurrentMode.Windowed = false; + p->Driver->setWindowStyle(CDriverGL::EWSWindowed); + p->Driver->setWindowSize(monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top); LONG dwStyle = GetWindowLong(p->Driver->_win, GWL_STYLE); SetWindowLong(p->Driver->_win, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW); SetWindowPos(p->Driver->_win, NULL,