Index: ddraw/glRenderer.cpp |
— | — | @@ -368,6 +368,8 @@ |
369 | 369 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
370 | 370 | break;
|
371 | 371 | case 1: // Non-exclusive Fullscreen
|
| 372 | + case 4: // Windowed borderless
|
| 373 | + case 5: // Windowed borderless scaled
|
372 | 374 | winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
373 | 375 | winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
|
374 | 376 | SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
— | — | @@ -388,20 +390,6 @@ |
389 | 391 | SetWindowLongPtrA(This->hWnd, GWL_STYLE, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP);
|
390 | 392 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
391 | 393 | break;
|
392 | | - case 4: // Windowed borderless
|
393 | | - winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
394 | | - winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
|
395 | | - SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
396 | | - SetWindowLongPtrA(This->hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
397 | | - ShowWindow(This->hWnd, SW_MAXIMIZE);
|
398 | | - break;
|
399 | | - case 5: // Windowed borderless scaled
|
400 | | - winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
401 | | - winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
|
402 | | - SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
403 | | - SetWindowLongPtrA(This->hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
404 | | - ShowWindow(This->hWnd, SW_MAXIMIZE);
|
405 | | - break;
|
406 | 394 | }
|
407 | 395 | }
|
408 | 396 | if(width)
|
— | — | @@ -706,6 +694,7 @@ |
707 | 695 | ShowWindow(newwnd, SW_MAXIMIZE);
|
708 | 696 | break;
|
709 | 697 | case 1: // Non-exclusive Fullscreen
|
| 698 | + case 5: // Windowed borderless scaled
|
710 | 699 | winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
|
711 | 700 | winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
712 | 701 | SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
— | — | @@ -759,13 +748,6 @@ |
760 | 749 | SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
761 | 750 | wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
762 | 751 | break;
|
763 | | - case 5: // Windowed borderless scaled
|
764 | | - winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
|
765 | | - winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
766 | | - SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
767 | | - SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
768 | | - ShowWindow(newwnd, SW_MAXIMIZE);
|
769 | | - break;
|
770 | 752 | }
|
771 | 753 | }
|
772 | 754 | This->inputs[0] = (void*)width;
|
Index: ddraw/hooks.c |
— | — | @@ -312,6 +312,10 @@ |
313 | 313 | break;
|
314 | 314 | case 1:
|
315 | 315 | // Fix non-exclusive fullscreen mode
|
| 316 | + case 4:
|
| 317 | + // Fix borderless window mode
|
| 318 | + case 5:
|
| 319 | + // Fix scaled borderless window mode
|
316 | 320 | if (lpDD7)
|
317 | 321 | {
|
318 | 322 | glDirectDraw7_GetSizes(lpDD7, sizes);
|
— | — | @@ -368,46 +372,6 @@ |
369 | 373 | }
|
370 | 374 | }
|
371 | 375 | break;
|
372 | | - case 4:
|
373 | | - // Fix borderless window mode
|
374 | | - if (lpDD7)
|
375 | | - {
|
376 | | - glDirectDraw7_GetSizes(lpDD7, sizes);
|
377 | | - GetWindowRect(hWnd, &r1);
|
378 | | - GetClientRect(hWnd, &r2);
|
379 | | - winstyle = GetWindowLong(hWnd, GWL_STYLE);
|
380 | | - exstyle = GetWindowLong(hWnd, GWL_EXSTYLE);
|
381 | | - if (winstyle & (WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP)) fixstyle = TRUE;
|
382 | | - if (exstyle & (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)) fixstyle = TRUE;
|
383 | | - if (!((r1.left == 0) && (r1.top == 0) && (r2.right == sizes[4]) && (r2.bottom == sizes[5]))) fixstyle = TRUE;
|
384 | | - if (fixstyle)
|
385 | | - {
|
386 | | - SetWindowLongPtrA(hWnd, GWL_EXSTYLE, exstyle & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
387 | | - SetWindowLongPtrA(hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
388 | | - SetWindowPos(hWnd, NULL, 0, 0, sizes[4], sizes[5], SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_FRAMECHANGED);
|
389 | | - }
|
390 | | - }
|
391 | | - break;
|
392 | | - case 5:
|
393 | | - // Fix scaled borderless window mode
|
394 | | - if (lpDD7)
|
395 | | - {
|
396 | | - glDirectDraw7_GetSizes(lpDD7, sizes);
|
397 | | - GetWindowRect(hWnd, &r1);
|
398 | | - GetClientRect(hWnd, &r2);
|
399 | | - winstyle = GetWindowLong(hWnd, GWL_STYLE);
|
400 | | - exstyle = GetWindowLong(hWnd, GWL_EXSTYLE);
|
401 | | - if (winstyle & (WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP)) fixstyle = TRUE;
|
402 | | - if (exstyle & (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)) fixstyle = TRUE;
|
403 | | - if (!((r1.left == 0) && (r1.top == 0) && (r2.right == sizes[4]) && (r2.bottom == sizes[5]))) fixstyle = TRUE;
|
404 | | - if (fixstyle)
|
405 | | - {
|
406 | | - SetWindowLongPtrA(hWnd, GWL_EXSTYLE, exstyle & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
407 | | - SetWindowLongPtrA(hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
408 | | - SetWindowPos(hWnd, NULL, 0, 0, sizes[4], sizes[5], SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_FRAMECHANGED);
|
409 | | - }
|
410 | | - }
|
411 | | - break;
|
412 | 376 | }
|
413 | 377 | }
|
414 | 378 | break;
|