ddraw: Store the palette flags in the ddraw palette.

This commit is contained in:
Henri Verbeet 2013-12-12 10:23:32 +01:00 committed by Alexandre Julliard
parent 9651079ff9
commit bf7f80f4b3
5 changed files with 4 additions and 27 deletions

View File

@ -379,9 +379,8 @@ struct ddraw_palette
LONG ref;
struct wined3d_palette *wineD3DPalette;
/* IDirectDrawPalette fields */
IUnknown *ifaceToRelease;
IUnknown *ifaceToRelease;
DWORD flags;
};
static inline struct ddraw_palette *impl_from_IDirectDrawPalette(IDirectDrawPalette *iface)

View File

@ -130,20 +130,6 @@ static HRESULT WINAPI ddraw_palette_Initialize(IDirectDrawPalette *iface,
return DDERR_ALREADYINITIALIZED;
}
/*****************************************************************************
* IDirectDrawPalette::GetCaps
*
* Returns the palette description
*
* Params:
* Caps: Address to store the caps at
*
* Returns:
* D3D_OK on success
* DDERR_INVALIDPARAMS if Caps is NULL
* For more details, see IWineD3DPalette::GetCaps
*
*****************************************************************************/
static HRESULT WINAPI ddraw_palette_GetCaps(IDirectDrawPalette *iface, DWORD *caps)
{
struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface);
@ -151,7 +137,7 @@ static HRESULT WINAPI ddraw_palette_GetCaps(IDirectDrawPalette *iface, DWORD *ca
TRACE("iface %p, caps %p.\n", iface, caps);
wined3d_mutex_lock();
*caps = wined3d_palette_get_flags(palette->wineD3DPalette);
*caps = palette->flags;
wined3d_mutex_unlock();
return D3D_OK;
@ -257,6 +243,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette,
palette->IDirectDrawPalette_iface.lpVtbl = &ddraw_palette_vtbl;
palette->ref = 1;
palette->flags = flags;
if (FAILED(hr = wined3d_palette_create(ddraw->wined3d_device, flags, entries, &palette->wineD3DPalette)))
{

View File

@ -145,13 +145,6 @@ HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette,
return WINED3D_OK;
}
DWORD CDECL wined3d_palette_get_flags(const struct wined3d_palette *palette)
{
TRACE("palette %p.\n", palette);
return palette->flags;
}
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device,
DWORD flags, const PALETTEENTRY *entries)
{

View File

@ -159,7 +159,6 @@
@ cdecl wined3d_palette_create(ptr long ptr ptr)
@ cdecl wined3d_palette_decref(ptr)
@ cdecl wined3d_palette_get_entries(ptr long long long ptr)
@ cdecl wined3d_palette_get_flags(ptr)
@ cdecl wined3d_palette_incref(ptr)
@ cdecl wined3d_palette_set_entries(ptr long long long ptr)

View File

@ -2239,7 +2239,6 @@ HRESULT __cdecl wined3d_palette_create(struct wined3d_device *device, DWORD flag
ULONG __cdecl wined3d_palette_decref(struct wined3d_palette *palette);
HRESULT __cdecl wined3d_palette_get_entries(const struct wined3d_palette *palette,
DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries);
DWORD __cdecl wined3d_palette_get_flags(const struct wined3d_palette *palette);
ULONG __cdecl wined3d_palette_incref(struct wined3d_palette *palette);
HRESULT __cdecl wined3d_palette_set_entries(struct wined3d_palette *palette,
DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries);