1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-16 06:18:53 +01:00

fix for automatic stretching - don't go higher than current resolution

This commit is contained in:
FunkyFr3sh 2018-08-15 19:49:30 +02:00
parent 7661a589bb
commit 5cf78996a4
2 changed files with 3 additions and 2 deletions

@ -2,7 +2,7 @@
#define vxstr(a,b,c,d) str(a##.##b##.##c##.##d) #define vxstr(a,b,c,d) str(a##.##b##.##c##.##d)
#define str(s) #s #define str(s) #s
#define VERSION 1,1,8,6 #define VERSION 1,1,8,7
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION VERSION FILEVERSION VERSION

@ -335,7 +335,8 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
This->render.mode.dmPelsWidth = This->render.width; This->render.mode.dmPelsWidth = This->render.width;
This->render.mode.dmPelsHeight = This->render.height; This->render.mode.dmPelsHeight = This->render.height;
if (ChangeDisplaySettings(&This->render.mode, CDS_TEST) != DISP_CHANGE_SUCCESSFUL) if ((This->render.width > This->mode.dmPelsWidth || This->render.height > This->mode.dmPelsHeight) ||
ChangeDisplaySettings(&This->render.mode, CDS_TEST) != DISP_CHANGE_SUCCESSFUL)
{ {
// try current display settings // try current display settings
This->render.width = This->mode.dmPelsWidth; This->render.width = This->mode.dmPelsWidth;