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

opengl / d3d9 windowed-fullscreen aka borderless

This commit is contained in:
FunkyFr3sh 2018-10-05 10:01:38 +02:00
parent f1829bf760
commit 7bffd78db5
2 changed files with 13 additions and 1 deletions

View File

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

View File

@ -270,6 +270,18 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
{
This->render.width = This->mode.dmPelsWidth;
This->render.height = This->mode.dmPelsHeight;
if (This->windowed) //windowed-fullscreen aka borderless
{
This->border = FALSE;
WindowPosX = -1;
WindowPosY = -1;
// prevent OpenGL from going automatically into fullscreen exclusive mode
if (This->renderer == render_main)
This->render.height++;
}
}
if(This->render.width < This->width)