mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
support GetAvailableVidMem
This commit is contained in:
parent
86caa3b215
commit
cee27902b1
@ -174,6 +174,7 @@ struct IDirectDrawImplVtbl
|
||||
};
|
||||
|
||||
HRESULT(__stdcall *WaitForVerticalBlank)(IDirectDrawImpl *, DWORD, HANDLE);
|
||||
HRESULT(__stdcall *GetAvailableVidMem)(IDirectDrawImpl *, LPDDSCAPS, LPDWORD, LPDWORD);
|
||||
};
|
||||
|
||||
typedef enum PROCESS_DPI_AWARENESS {
|
||||
|
15
src/main.c
15
src/main.c
@ -334,7 +334,7 @@ HRESULT __stdcall ddraw_EnumDisplayModes(IDirectDrawImpl *This, DWORD dwFlags, L
|
||||
|
||||
if (lpDDSurfaceDesc != NULL)
|
||||
{
|
||||
return DDERR_UNSUPPORTED;
|
||||
//return DDERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
// Some games crash when you feed them with too many resolutions...
|
||||
@ -1695,6 +1695,16 @@ HRESULT __stdcall ddraw_WaitForVerticalBlank(IDirectDrawImpl *This, DWORD a, HAN
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall ddraw_GetAvailableVidMem(IDirectDrawImpl *This, LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree)
|
||||
{
|
||||
printf("??? DirectDraw::GetAvailableVidMem(This=%p)\n", This);
|
||||
|
||||
*lpdwTotal = 16777216;
|
||||
*lpdwFree = 16777216;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
ULONG __stdcall ddraw_AddRef(IDirectDrawImpl *This)
|
||||
{
|
||||
printf("DirectDraw::AddRef(This=%p)\n", This);
|
||||
@ -1827,7 +1837,8 @@ struct IDirectDrawImplVtbl iface =
|
||||
ddraw_RestoreDisplayMode,
|
||||
ddraw_SetCooperativeLevel,
|
||||
ddraw_SetDisplayMode,
|
||||
ddraw_WaitForVerticalBlank
|
||||
ddraw_WaitForVerticalBlank,
|
||||
ddraw_GetAvailableVidMem
|
||||
};
|
||||
|
||||
HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACK lpCallback, LPVOID lpContext)
|
||||
|
Loading…
x
Reference in New Issue
Block a user