1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

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

@ -1,6 +1,6 @@
1 VERSIONINFO
FILEVERSION 1,1,5,6
PRODUCTVERSION 1,1,5,6
FILEVERSION 1,1,5,7
PRODUCTVERSION 1,1,5,7
{
BLOCK "StringFileInfo"
{
@ -8,13 +8,13 @@ PRODUCTVERSION 1,1,5,6
{
VALUE "CompanyName", "cncnet.org"
VALUE "FileDescription", "DirectDraw replacement for C&C95 and Red Alert"
VALUE "FileVersion", "1.1.5.6"
VALUE "FileVersion", "1.1.5.7"
VALUE "InternalName", "ddraw"
VALUE "LegalCopyright", "Copyright (c) 2010-2018"
VALUE "LegalTrademarks", ""
VALUE "OriginalFileName", "ddraw.dll"
VALUE "ProductName", "DirectDraw replacement for C&C95 and Red Alert"
VALUE "ProductVersion", "1.1.5.6"
VALUE "ProductVersion", "1.1.5.7"
VALUE "Comments", "https://cncnet.org"
}
}

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 ||