Index: Help/configuration.htm |
— | — | @@ -98,5 +98,8 @@ |
99 | 99 | Forces the fullscreen application to display in a floating window that can be resized or maximized. Please note that some applications may capture the mouse and thus may cause compatibility issues.
|
100 | 100 | <h3>Borderless window</h3>
|
101 | 101 | Forces the application to display in a borderless pop-up window. If the application is not running at the same resolution as the display, the window will be the same size as the application's display resolution.
|
| 102 | + <h3>Borderless window (scaled)</h3>
|
| 103 | + Forces the application to display in a borderless pop-up window. Sizes the window to fill the screen. Similar to Non-exclusive fullscreen except that the window does not minimize when focus is lost.
|
| 104 | + Depending on the "Video mode" setting, the graphics resolution may be changed to accomodate the application.
|
102 | 105 | </body>
|
103 | 106 | </html> |
\ No newline at end of file |
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -1642,7 +1642,8 @@ |
1643 | 1643 | {
|
1644 | 1644 | case 0:
|
1645 | 1645 | case 1:
|
1646 | | - default: // Fullscreen modes and fallback
|
| 1646 | + case 5:
|
| 1647 | + default: // Fullscreen modes, scaled borderless window, and fallback
|
1647 | 1648 | switch (dxglcfg.scaler)
|
1648 | 1649 | {
|
1649 | 1650 | case 0: // No scaling, switch mode
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -395,6 +395,13 @@ |
396 | 396 | SetWindowLongPtrA(This->hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
397 | 397 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
398 | 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;
|
399 | 406 | }
|
400 | 407 | }
|
401 | 408 | if(width)
|
— | — | @@ -698,7 +705,7 @@ |
699 | 706 | SetWindowLongPtrA(newwnd, GWL_STYLE, (winstyle | WS_POPUP) & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER));
|
700 | 707 | ShowWindow(newwnd, SW_MAXIMIZE);
|
701 | 708 | break;
|
702 | | - case 1: // Borderless Fullscreen
|
| 709 | + case 1: // Non-exclusive Fullscreen
|
703 | 710 | winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
|
704 | 711 | winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
705 | 712 | SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
— | — | @@ -752,6 +759,13 @@ |
753 | 760 | SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
754 | 761 | wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
755 | 762 | 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;
|
756 | 770 | }
|
757 | 771 | }
|
758 | 772 | This->inputs[0] = (void*)width;
|
Index: ddraw/hooks.c |
— | — | @@ -388,6 +388,26 @@ |
389 | 389 | }
|
390 | 390 | }
|
391 | 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;
|
392 | 412 | }
|
393 | 413 | }
|
394 | 414 | break;
|
Index: dxglcfg/dxglcfg.c |
— | — | @@ -569,6 +569,8 @@ |
570 | 570 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 3, (LPARAM)buffer);
|
571 | 571 | _tcscpy(buffer, _T("Borderless window"));
|
572 | 572 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 4, (LPARAM)buffer);
|
| 573 | + _tcscpy(buffer, _T("Borderless window (scaled)"));
|
| 574 | + SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 5, (LPARAM)buffer);
|
573 | 575 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_SETCURSEL, cfg->fullmode, 0);
|
574 | 576 | // colormode
|
575 | 577 | if(cfg->colormode) SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_CHECKED,0);
|