DXGL r697 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r696‎ | r697 | r698 >
Date:04:30, 12 March 2017
Author:admin
Status:new
Tags:
Comment:
Fix a regression that can cause a black screen in fullscreen mode.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -2042,18 +2042,24 @@
20432043 switch (dxglcfg.fullmode)
20442044 {
20452045 case 0: // Fullscreen
2046 - winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
 2046+ /*winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
20472047 winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
20482048 SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
20492049 SetWindowLongPtrA(newwnd, GWL_STYLE, (winstyle | WS_POPUP) & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER));
 2050+ ShowWindow(newwnd, SW_MAXIMIZE);*/ //This seems to cause a black screen in some cases
 2051+ SetWindowLongPtrA(newwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
 2052+ SetWindowLongPtrA(newwnd, GWL_STYLE, WS_OVERLAPPED|WS_POPUP);
20502053 ShowWindow(newwnd, SW_MAXIMIZE);
20512054 break;
20522055 case 1: // Non-exclusive Fullscreen
20532056 case 5: // Windowed borderless scaled
2054 - winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
 2057+ /*winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
20552058 winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
20562059 SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
20572060 SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
 2061+ ShowWindow(newwnd, SW_MAXIMIZE);*/ //This seems to cause a black screen in some cases
 2062+ SetWindowLongPtrA(newwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
 2063+ SetWindowLongPtrA(newwnd, GWL_STYLE, WS_OVERLAPPED);
20582064 ShowWindow(newwnd, SW_MAXIMIZE);
20592065 break;
20602066 case 2: // Windowed