Index: Help/configuration.htm |
— | — | @@ -90,11 +90,13 @@ |
91 | 91 | <h3>Exclusive fullscreen</h3>
|
92 | 92 | Sets the display to fullscreen mode. For Windows Vista and greater, causes the Windows graphics to be temporarily suspended, giving the GPU exclusive control of the screen. This mode is the default and may have the best fullscreen performance.
|
93 | 93 | <h3>Non-exclusive fullscreen</h3>
|
94 | | - Creates a window that fills the screen but tells the display driver not to take exclusive control of the screen. This is also known as borderless windowed mode. Try this mode if the application mixes DirectDraw with GDI and some graphics elements are missing.
|
95 | | - In Windows Vista and greater, this mode may have reduced performance, increased lag, or choppy graphics.
|
| 94 | + Creates a window that fills the screen but tells the display driver not to take exclusive control of the screen. Try this mode if the application mixes DirectDraw with GDI and some graphics elements are missing.
|
| 95 | + In Windows Vista and greater, this mode may have reduced performance, increased lag, or choppy graphics. In Windows 8 and 8.1, this performance reduction may be significant due to an operating system flaw.
|
96 | 96 | <h3>Non-resizable window</h3>
|
97 | 97 | Forces the fullscreen application to display in a floating window. Please note that some applications may capture the mouse and thus may cause compatibility issues.
|
98 | 98 | <h3>Resizable window</h3>
|
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 | + <h3>Borderless window</h3>
|
| 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.
|
100 | 102 | </body>
|
101 | 103 | </html> |
\ No newline at end of file |
Index: cfgmgr/ReadMe.txt |
— | — | @@ -17,9 +17,10 @@ |
18 | 18 | Determines how to handle fullscreen modes.
|
19 | 19 | Valid settings:
|
20 | 20 | 0 - Use exclusive fullscreen
|
21 | | -1 - Use non-exclusive fullscreen aka borderless window
|
| 21 | +1 - Use non-exclusive fullscreen, not quite borderless windowed mode
|
22 | 22 | 2 - Use a non-resizable window
|
23 | 23 | 3 - Use a resizable window, uses scaler mode, preferably 1, 2, 3, or 7
|
| 24 | +4 - Use a borderless, non-resizable window, called windowed borderless in industry
|
24 | 25 |
|
25 | 26 | Member colormode
|
26 | 27 | REG_DWORD HKCU\DXGL\<app>\ChangeColorDepth
|
Index: ddraw/glDirectDraw.cpp |
— | — | @@ -1926,7 +1926,8 @@ |
1927 | 1927 | }
|
1928 | 1928 | break;
|
1929 | 1929 | case 2:
|
1930 | | - case 3: // Forced windowed modes
|
| 1930 | + case 3:
|
| 1931 | + case 4: // Forced windowed modes
|
1931 | 1932 | primaryx = internalx = screenx = dwWidth;
|
1932 | 1933 | primaryy = internaly = screeny = dwHeight;
|
1933 | 1934 | internalbpp = screenbpp = dwBPP;
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -367,7 +367,7 @@ |
368 | 368 | SetWindowLongPtrA(This->hWnd, GWL_STYLE, (winstyle | WS_POPUP) & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER));
|
369 | 369 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
370 | 370 | break;
|
371 | | - case 1: // Fullscreen
|
| 371 | + case 1: // Non-exclusive Fullscreen
|
372 | 372 | winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
373 | 373 | winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
|
374 | 374 | SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | SetWindowLongPtrA(This->hWnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
376 | 376 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
377 | 377 | break;
|
378 | | - case 2: // Windowed
|
| 378 | + case 2: // Windowed non-resizable
|
379 | 379 | winstyle = GetWindowLongPtrA(This->hWnd, GWL_STYLE);
|
380 | 380 | winstyleex = GetWindowLongPtrA(This->hWnd, GWL_EXSTYLE);
|
381 | 381 | SetWindowLongPtrA(This->hWnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
|
— | — | @@ -388,6 +388,13 @@ |
389 | 389 | SetWindowLongPtrA(This->hWnd, GWL_STYLE, (winstyle | WS_OVERLAPPEDWINDOW) & ~WS_POPUP);
|
390 | 390 | ShowWindow(This->hWnd, SW_MAXIMIZE);
|
391 | 391 | 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;
|
392 | 399 | }
|
393 | 400 | }
|
394 | 401 | if(width)
|
— | — | @@ -730,6 +737,21 @@ |
731 | 738 | SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
732 | 739 | wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
733 | 740 | break;
|
| 741 | + case 4: // Windowed borderless
|
| 742 | + winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
|
| 743 | + winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
| 744 | + SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex & ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE));
|
| 745 | + SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER | WS_POPUP));
|
| 746 | + ShowWindow(newwnd, SW_NORMAL);
|
| 747 | + screenx = GetSystemMetrics(SM_CXSCREEN);
|
| 748 | + screeny = GetSystemMetrics(SM_CYSCREEN);
|
| 749 | + wndrect.right = width + (screenx / 2) - (width / 2);
|
| 750 | + wndrect.bottom = height + (screeny / 2) - (height / 2);
|
| 751 | + wndrect.left = (screenx / 2) - (width / 2);
|
| 752 | + wndrect.top = (screeny / 2) - (height / 2);
|
| 753 | + SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
| 754 | + wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| 755 | + break;
|
734 | 756 | }
|
735 | 757 | }
|
736 | 758 | This->inputs[0] = (void*)width;
|
Index: ddraw/hooks.c |
— | — | @@ -290,7 +290,7 @@ |
291 | 291 | switch (dxglcfg.fullmode)
|
292 | 292 | {
|
293 | 293 | case 0:
|
294 | | - // Fix fullscreen mode
|
| 294 | + // Fix exclusive fullscreen mode
|
295 | 295 | if (lpDD7)
|
296 | 296 | {
|
297 | 297 | glDirectDraw7_GetSizes(lpDD7, sizes);
|
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | }
|
313 | 313 | break;
|
314 | 314 | case 1:
|
315 | | - // Fix borderless mode
|
| 315 | + // Fix non-exclusive fullscreen mode
|
316 | 316 | if (lpDD7)
|
317 | 317 | {
|
318 | 318 | glDirectDraw7_GetSizes(lpDD7, sizes);
|
— | — | @@ -368,6 +368,26 @@ |
369 | 369 | }
|
370 | 370 | }
|
371 | 371 | 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;
|
372 | 392 | }
|
373 | 393 | }
|
374 | 394 | break;
|
Index: dxglcfg/dxglcfg.c |
— | — | @@ -567,6 +567,8 @@ |
568 | 568 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 2, (LPARAM)buffer);
|
569 | 569 | _tcscpy(buffer, _T("Resizable window"));
|
570 | 570 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 3, (LPARAM)buffer);
|
| 571 | + _tcscpy(buffer, _T("Borderless window"));
|
| 572 | + SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_ADDSTRING, 4, (LPARAM)buffer);
|
571 | 573 | SendDlgItemMessage(hWnd, IDC_FULLMODE, CB_SETCURSEL, cfg->fullmode, 0);
|
572 | 574 | // colormode
|
573 | 575 | if(cfg->colormode) SendDlgItemMessage(hWnd,IDC_COLOR,BM_SETCHECK,BST_CHECKED,0);
|