Initialize an identity mapping in CreatePalette if no depth conversion

is necessary. Also fixed a warning.
This commit is contained in:
Ove Kaaven 2000-05-18 00:03:36 +00:00 committed by Alexandre Julliard
parent d3e7e214e2
commit 9d0abdbcca
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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);
}
/*******************************************************************************