| Index: ddraw/glRenderer.cpp |
| — | — | @@ -626,29 +626,29 @@ |
| 627 | 627 | ShowWindow(newwnd, SW_NORMAL);
|
| 628 | 628 | screenx = GetSystemMetrics(SM_CXSCREEN);
|
| 629 | 629 | screeny = GetSystemMetrics(SM_CYSCREEN);
|
| 630 | | - wndrect.right = width;
|
| 631 | | - wndrect.bottom = height;
|
| | 630 | + wndrect.right = width + (screenx / 2) - (width / 2);
|
| | 631 | + wndrect.bottom = height + (screeny / 2) - (height / 2);
|
| 632 | 632 | wndrect.left = (screenx / 2) - (width / 2);
|
| 633 | 633 | wndrect.top = (screeny / 2) - (height / 2);
|
| 634 | 634 | AdjustWindowRect(&wndrect, (winstyle | WS_OVERLAPPEDWINDOW) & ~(WS_THICKFRAME | WS_MAXIMIZEBOX), FALSE);
|
| 635 | | - SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right,
|
| 636 | | - wndrect.bottom, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| | 635 | + SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
| | 636 | + wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| 637 | 637 | break;
|
| 638 | 638 | case 3: // Windowed resizable
|
| 639 | 639 | winstyle = GetWindowLongPtrA(newwnd, GWL_STYLE);
|
| 640 | 640 | winstyleex = GetWindowLongPtrA(newwnd, GWL_EXSTYLE);
|
| 641 | 641 | SetWindowLongPtrA(newwnd, GWL_EXSTYLE, winstyleex | WS_EX_APPWINDOW);
|
| 642 | | - SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle | WS_OVERLAPPEDWINDOW);
|
| | 642 | + SetWindowLongPtrA(newwnd, GWL_STYLE, winstyle | WS_SYSMENU | WS_OVERLAPPEDWINDOW);
|
| 643 | 643 | ShowWindow(newwnd, SW_NORMAL);
|
| 644 | 644 | screenx = GetSystemMetrics(SM_CXSCREEN);
|
| 645 | 645 | screeny = GetSystemMetrics(SM_CYSCREEN);
|
| 646 | | - wndrect.right = width;
|
| 647 | | - wndrect.bottom = height;
|
| | 646 | + wndrect.right = width + (screenx / 2) - (width / 2);
|
| | 647 | + wndrect.bottom = height + (screeny / 2) - (height / 2);
|
| 648 | 648 | wndrect.left = (screenx / 2) - (width / 2);
|
| 649 | 649 | wndrect.top = (screeny / 2) - (height / 2);
|
| 650 | 650 | AdjustWindowRect(&wndrect, winstyle | WS_OVERLAPPEDWINDOW, FALSE);
|
| 651 | | - SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right,
|
| 652 | | - wndrect.bottom, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| | 651 | + SetWindowPos(newwnd, 0, wndrect.left, wndrect.top, wndrect.right - wndrect.left,
|
| | 652 | + wndrect.bottom - wndrect.top, SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
|
| 653 | 653 | break;
|
| 654 | 654 | }
|
| 655 | 655 | }
|