mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
enable flip for dune 2000
This commit is contained in:
parent
0a7a552c79
commit
4ab472ab9b
2
ddraw.rc
2
ddraw.rc
@ -4,7 +4,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_BUILD 2
|
#define VERSION_BUILD 2
|
||||||
#define VERSION_REVISION 0
|
#define VERSION_REVISION 2
|
||||||
|
|
||||||
#define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION
|
#define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION
|
||||||
#define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION)
|
#define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION)
|
||||||
|
@ -368,6 +368,7 @@ HRESULT __stdcall ddraw_GetCaps(IDirectDrawImpl *This, LPDDCAPS lpDDDriverCaps,
|
|||||||
lpDDDriverCaps->dwAlignSizeSrc = 0;
|
lpDDDriverCaps->dwAlignSizeSrc = 0;
|
||||||
lpDDDriverCaps->dwAlignBoundaryDest = 0;
|
lpDDDriverCaps->dwAlignBoundaryDest = 0;
|
||||||
lpDDDriverCaps->dwAlignSizeDest = 0;
|
lpDDDriverCaps->dwAlignSizeDest = 0;
|
||||||
|
lpDDDriverCaps->ddsCaps.dwCaps = DDSCAPS_FLIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lpDDEmulCaps)
|
if(lpDDEmulCaps)
|
||||||
|
@ -604,6 +604,9 @@ HRESULT __stdcall ddraw_surface_GetSurfaceDesc(IDirectDrawSurfaceImpl *This, LPD
|
|||||||
lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount = This->bpp;
|
lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount = This->bpp;
|
||||||
lpDDSurfaceDesc->ddsCaps.dwCaps = This->caps;
|
lpDDSurfaceDesc->ddsCaps.dwCaps = This->caps;
|
||||||
|
|
||||||
|
if ((This->caps & DDSCAPS_PRIMARYSURFACE) && (This->caps & DDSCAPS_FLIP))
|
||||||
|
lpDDSurfaceDesc->ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
|
||||||
|
|
||||||
if (This->bpp == 8)
|
if (This->bpp == 8)
|
||||||
{
|
{
|
||||||
lpDDSurfaceDesc->ddpfPixelFormat.dwFlags |= DDPF_PALETTEINDEXED8;
|
lpDDSurfaceDesc->ddpfPixelFormat.dwFlags |= DDPF_PALETTEINDEXED8;
|
||||||
@ -668,6 +671,22 @@ HRESULT __stdcall ddraw_surface_Flip(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWS
|
|||||||
SwitchToThread();
|
SwitchToThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (flags & DDFLIP_WAIT)
|
||||||
|
{
|
||||||
|
DWORD tick = This->lastFlipTick;
|
||||||
|
while (tick % 17) tick++;
|
||||||
|
int sleepTime = tick - This->lastFlipTick;
|
||||||
|
|
||||||
|
int renderTime = timeGetTime() - This->lastFlipTick;
|
||||||
|
if (renderTime > 0)
|
||||||
|
sleepTime -= renderTime;
|
||||||
|
|
||||||
|
if (sleepTime > 0 && sleepTime <= 17)
|
||||||
|
Sleep(sleepTime);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (ddraw->ticklength > 0)
|
if (ddraw->ticklength > 0)
|
||||||
LimitGameTicks(TRUE);
|
LimitGameTicks(TRUE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user