Skip to content

Commit

Permalink
fix for automatic stretching - don't go higher than current resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Aug 15, 2018
1 parent 7661a58 commit 5cf7899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ddraw.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define vxstr(a,b,c,d) str(a##.##b##.##c##.##d)
#define str(s) #s

#define VERSION 1,1,8,6
#define VERSION 1,1,8,7

1 VERSIONINFO
FILEVERSION VERSION
Expand Down
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
This->render.mode.dmPelsWidth = This->render.width;
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
This->render.width = This->mode.dmPelsWidth;
Expand Down

0 comments on commit 5cf7899

Please sign in to comment.