DXGL r636 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r635‎ | r636 | r637 >
Date:00:51, 13 January 2016
Author:admin
Status:new
Tags:
Comment:
Fix flipped titlebars in window mode.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -234,7 +234,7 @@
235235 case 2: // Windowed
236236 winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
237237 winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
238 - SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex | WS_OVERLAPPEDWINDOW);
 238+ SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
239239 SetWindowLongPtrA(This->hWnd, GWL_STYLE, (winstyle | WS_OVERLAPPEDWINDOW) & ~(WS_THICKFRAME | WS_MAXIMIZEBOX));
240240 ShowWindow(This->hWnd, SW_MAXIMIZE);
241241 break;
@@ -241,7 +241,7 @@
242242 case 3: // Windowed resizable
243243 winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
244244 winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
245 - SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex | WS_OVERLAPPEDWINDOW);
 245+ SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
246246 SetWindowLongPtrA(This->hWnd, GWL_STYLE, winstyle | WS_OVERLAPPEDWINDOW);
247247 ShowWindow(This->hWnd, SW_MAXIMIZE);
248248 break;
@@ -621,7 +621,7 @@
622622 case 2: // Windowed
623623 winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
624624 winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
625 - SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_OVERLAPPEDWINDOW);
 625+ SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
626626 SetWindowLongPtrA(newwnd, GWL_STYLE, (winstyle | WS_OVERLAPPEDWINDOW) & ~(WS_THICKFRAME | WS_MAXIMIZEBOX));
627627 ShowWindow(newwnd, SW_NORMAL);
628628 screenx = GetSystemMetrics(SM_CXSCREEN);
@@ -637,7 +637,7 @@
638638 case 3: // Windowed resizable
639639 winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
640640 winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
641 - SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_OVERLAPPEDWINDOW);
 641+ SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
642642 SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle | WS_OVERLAPPEDWINDOW);
643643 ShowWindow(newwnd, SW_NORMAL);
644644 screenx = GetSystemMetrics(SM_CXSCREEN);