Commit 9d0abdbc authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Initialize an identity mapping in CreatePalette if no depth conversion

is necessary. Also fixed a warning.
parent d3e7e214
......@@ -192,6 +192,12 @@ HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette(
ERR("unhandled palette format\n");
*psize = size;
if (This->d.palette_convert == NULL) {
/* No depth conversion - create 8<->8 identity map */
int ent;
for (ent=0; ent<256; ent++)
(*lpddpal)->screen_palents[ent] = ent;
}
if (palent) {
/* Now, if we are in depth conversion mode, create the screen palette */
if (This->d.palette_convert != NULL)
......
......@@ -330,7 +330,7 @@ HRESULT WINAPI DirectDrawCreateEx(
) {
FIXME(":semi stub\n");
/* I don't know about what functionality is unique to Ex */
return DirectDrawCreate(lpGUID,(LPDIRECTDRAW)lplpDD,pUnkOuter);
return DirectDrawCreate(lpGUID,(LPDIRECTDRAW*)lplpDD,pUnkOuter);
}
/*******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment