Index: ddraw/glDirectDraw.cpp |
— | — | @@ -1435,6 +1435,13 @@ |
1436 | 1436 | {
|
1437 | 1437 | glDD7->GetSizes(sizes);
|
1438 | 1438 | }
|
| 1439 | +extern "C" void glDirectDraw7_SetWindowSize(glDirectDraw7 *glDD7, DWORD dwWidth, DWORD dwHeight)
|
| 1440 | +{
|
| 1441 | + glDD7->internalx = glDD7->screenx = dwWidth;
|
| 1442 | + glDD7->internaly = glDD7->screeny = dwHeight;
|
| 1443 | + if (glDD7->renderer && glDD7->primary) glRenderer_DrawScreen(glDD7->renderer, glDD7->primary->texture,
|
| 1444 | + glDD7->primary->paltex, glDD7->primary, glDD7->primary, 0);
|
| 1445 | +}
|
1439 | 1446 |
|
1440 | 1447 |
|
1441 | 1448 | HRESULT WINAPI glDirectDraw7::SetCooperativeLevel(HWND hWnd, DWORD dwFlags)
|
Index: ddraw/glDirectDraw.h |
— | — | @@ -142,6 +142,8 @@ |
143 | 143 | };
|
144 | 144 |
|
145 | 145 | extern "C" void glDirectDraw7_UnrestoreDisplayMode(glDirectDraw7 *This);
|
| 146 | +extern "C" void glDirectDraw7_GetSizes(glDirectDraw7 *glDD7, LONG *sizes);
|
| 147 | +extern "C" void glDirectDraw7_SetWindowSize(glDirectDraw7 *glDD7, DWORD dwWidth, DWORD dwHeight);
|
146 | 148 |
|
147 | 149 | class glDirectDraw1 : public IDirectDraw
|
148 | 150 | {
|
Index: ddraw/hooks.c |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 |
|
24 | 24 | // temporary references to C++ C-linked stuff
|
25 | 25 | void glDirectDraw7_UnrestoreDisplayMode(LPDIRECTDRAW7 lpDD7);
|
| 26 | +void glDirectDraw7_SetWindowSize(LPDIRECTDRAW7 lpDD7, DWORD dwWidth, DWORD dwHeight);
|
26 | 27 | extern DXGLCFG dxglcfg;
|
27 | 28 |
|
28 | 29 | const TCHAR *wndprop = _T("DXGLWndProc");
|
— | — | @@ -281,6 +282,14 @@ |
282 | 283 | if (lpDD7 && (dxglcfg.fullmode < 2)) glDirectDraw7_UnrestoreDisplayMode(lpDD7);
|
283 | 284 | }
|
284 | 285 | break;
|
| 286 | + case WM_SIZE:
|
| 287 | + if (wParam != SIZE_MINIMIZED)
|
| 288 | + {
|
| 289 | + if (dxglcfg.fullmode == 3)
|
| 290 | + {
|
| 291 | + if (lpDD7) glDirectDraw7_SetWindowSize(lpDD7, LOWORD(lParam), HIWORD(lParam));
|
| 292 | + }
|
| 293 | + }
|
285 | 294 | }
|
286 | 295 | return CallWindowProc(parentproc, hWnd, uMsg, wParam, lParam);
|
287 | 296 | }
|
Index: dxglcfg/dxglcfg.rc |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | AUTOCHECKBOX "Change display color depth", IDC_COLOR, 299, 14, 100, 10
|
49 | 49 | LTEXT "Scaling method", IDC_STATIC, 195, 69, 49, 8, SS_LEFT
|
50 | 50 | COMBOBOX IDC_SCALE, 195, 79, 102, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
51 | | - LTEXT "Fullscreen mode", IDC_STATIC, 299, 69, 41, 8, SS_LEFT
|
| 51 | + LTEXT "Fullscreen window mode", IDC_STATIC, 299, 69, 78, 8, SS_LEFT
|
52 | 52 | COMBOBOX IDC_FULLMODE, 299, 79, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS
|
53 | 53 | LTEXT "Post-processing shader", IDC_STATIC, 195, 94, 90, 8, SS_LEFT
|
54 | 54 | EDITTEXT IDC_SHADER, 195, 104, 183, 14, ES_AUTOHSCROLL
|