mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 14:24:45 +00:00
ddraw: Don't allow setting palette on non root surfaces.
This commit is contained in:
parent
1a609ecab8
commit
abf8728e1f
2 changed files with 6 additions and 1 deletions
|
@ -4233,6 +4233,11 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir
|
|||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
if (!This->is_complex_root)
|
||||
{
|
||||
return DDERR_NOTONMIPMAPSUBLEVEL;
|
||||
}
|
||||
|
||||
/* Find the old palette */
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
hr = IDirectDrawSurface_GetPalette(iface, &oldPal);
|
||||
|
|
|
@ -3006,7 +3006,7 @@ static void DeviceLoadTest(void)
|
|||
ok(hr==DDERR_NOPALETTEATTACHED, "IDirectDrawSurface7_GetPalette returned: %x\n", hr);
|
||||
|
||||
hr = IDirectDrawSurface7_SetPalette(texture_levels[0][1], palettes[1]);
|
||||
todo_wine ok(hr==DDERR_NOTONMIPMAPSUBLEVEL, "IDirectDrawSurface7_SetPalette returned: %x\n", hr);
|
||||
ok(hr==DDERR_NOTONMIPMAPSUBLEVEL, "IDirectDrawSurface7_SetPalette returned: %x\n", hr);
|
||||
hr = IDirectDrawSurface7_SetPalette(texture_levels[1][0], palettes[2]);
|
||||
ok(hr==DD_OK, "IDirectDrawSurface7_SetPalette returned: %x\n", hr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue