enable maintain aspect ratio on ChangeDisplaySettings failure

This commit is contained in:
FunkyFr3sh 2018-03-16 18:57:59 +01:00
parent 9ce87449ec
commit 5d31c5db48
2 changed files with 8 additions and 6 deletions

View file

@ -356,6 +356,8 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
This->windowed = TRUE;
}
else
This->maintas = TRUE;
}
}
}
@ -637,8 +639,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_MBUTTONUP:
if (!ddraw->devmode && !ddraw->locked)
{
int x = LOWORD(lParam);
int y = HIWORD(lParam);
int x = GET_X_LPARAM(lParam);
int y = GET_Y_LPARAM(lParam);
if (x > ddraw->render.viewport.x + ddraw->render.viewport.width ||
x < ddraw->render.viewport.x ||