mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
don't allow to set palette to surface that isn't 8bpp
This commit is contained in:
parent
82386fbbc4
commit
018d49ce36
@ -1091,6 +1091,9 @@ HRESULT dds_SetColorKey(IDirectDrawSurfaceImpl* This, DWORD dwFlags, LPDDCOLORKE
|
||||
|
||||
HRESULT dds_SetPalette(IDirectDrawSurfaceImpl* This, IDirectDrawPaletteImpl* lpDDPalette)
|
||||
{
|
||||
if (This->bpp != 8)
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
|
||||
if (lpDDPalette)
|
||||
IDirectDrawPalette_AddRef(lpDDPalette);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user