diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 2a5cce3f8ca..e184cfd2469 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1802,7 +1802,7 @@ static BOOL validate_surface_palette(struct ddraw_surface *surface) & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8)) - || wined3d_surface_get_palette(surface->wined3d_surface); + || surface->palette; } static HRESULT d3d_device_set_render_target(struct d3d_device *device, diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 349bbda6357..2efc98c9694 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -4982,7 +4982,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu for (;;) { - struct wined3d_palette *wined3d_dst_pal, *wined3d_src_pal; + struct ddraw_palette *dst_pal, *src_pal; DDSURFACEDESC *src_desc, *dst_desc; TRACE("Copying surface %p to surface %p (mipmap level %d).\n", @@ -4992,20 +4992,20 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD; /* Get the palettes */ - wined3d_dst_pal = wined3d_surface_get_palette(dst_surface->wined3d_surface); - wined3d_src_pal = wined3d_surface_get_palette(src_surface->wined3d_surface); + dst_pal = dst_surface->palette; + src_pal = src_surface->palette; - if (wined3d_src_pal) + if (src_pal) { PALETTEENTRY palent[256]; - if (!wined3d_dst_pal) + if (!dst_pal) { wined3d_mutex_unlock(); return DDERR_NOPALETTEATTACHED; } - wined3d_palette_get_entries(wined3d_src_pal, 0, 0, 256, palent); - wined3d_palette_set_entries(wined3d_dst_pal, 0, 0, 256, palent); + IDirectDrawPalette_GetEntries(&src_pal->IDirectDrawPalette_iface, 0, 0, 256, palent); + IDirectDrawPalette_SetEntries(&dst_pal->IDirectDrawPalette_iface, 0, 0, 256, palent); } /* Copy one surface on the other */ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1111df2e9e1..b671a0d52a7 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2381,13 +2381,6 @@ void CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struct w surface->surface_ops->surface_realize_palette(surface); } -struct wined3d_palette * CDECL wined3d_surface_get_palette(const struct wined3d_surface *surface) -{ - TRACE("surface %p.\n", surface); - - return surface->palette; -} - DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) { unsigned int alignment; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 99cf6bf03b8..41b31582bab 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -207,7 +207,6 @@ @ cdecl wined3d_surface_get_blt_status(ptr long) @ cdecl wined3d_surface_get_flip_status(ptr long) @ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr) -@ cdecl wined3d_surface_get_palette(ptr) @ cdecl wined3d_surface_get_parent(ptr) @ cdecl wined3d_surface_get_pitch(ptr) @ cdecl wined3d_surface_get_priority(ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 56bedcea842..db36fbf8c3f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2397,7 +2397,6 @@ struct wined3d_surface * __cdecl wined3d_surface_from_resource(struct wined3d_re HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *surface, DWORD flags); HRESULT __cdecl wined3d_surface_get_flip_status(const struct wined3d_surface *surface, DWORD flags); HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y); -struct wined3d_palette * __cdecl wined3d_surface_get_palette(const struct wined3d_surface *surface); void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface); DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface); DWORD __cdecl wined3d_surface_get_priority(const struct wined3d_surface *surface);