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

#36 return DDERR_NOPALETTEATTACHED on GetPalette

This commit is contained in:
FunkyFr3sh 2020-07-25 04:31:04 +02:00
parent a31d58c4c0
commit 417f6a6676

View File

@ -824,7 +824,15 @@ HRESULT __stdcall ddraw_surface_GetPalette(IDirectDrawSurfaceImpl *This, LPDIREC
{
printf("DirectDrawSurface::GetPalette(This=%p, lplpDDPalette=%p)\n", This, lplpDDPalette);
*lplpDDPalette = (LPDIRECTDRAWPALETTE)This->palette;
return DD_OK;
if (This->palette)
{
return DD_OK;
}
else
{
return DDERR_NOPALETTEATTACHED;
}
}
HRESULT __stdcall ddraw_surface_GetPixelFormat(IDirectDrawSurfaceImpl *This, LPDDPIXELFORMAT ddpfPixelFormat)