Module: wine Branch: stable Commit: ce5eb39a1c3ab82fa5ed8209699bd2c91d199b4e URL: https://source.winehq.org/git/wine.git/?a=commit;h=ce5eb39a1c3ab82fa5ed82096... Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Apr 26 22:58:28 2020 -0500 ddraw: Make palette and remaining surface vtbls writable. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46949 Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0b55384f0dc5382998bb2cc39c317d393ff7657a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ddraw/palette.c | 3 ++- dlls/ddraw/surface.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/palette.c b/dlls/ddraw/palette.c index 980c62b60b..68fb3a5320 100644 --- a/dlls/ddraw/palette.c +++ b/dlls/ddraw/palette.c @@ -215,7 +215,8 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface, return hr; } -static const struct IDirectDrawPaletteVtbl ddraw_palette_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawPaletteVtbl ddraw_palette_vtbl = { /*** IUnknown ***/ ddraw_palette_QueryInterface, diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 5790110999..fb8a0970a7 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -5405,7 +5405,8 @@ static HRESULT WINAPI d3d_texture1_Load(IDirect3DTexture *iface, IDirect3DTextur * The VTable *****************************************************************************/ -static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = { /* IUnknown */ ddraw_surface7_QueryInterface, @@ -5464,7 +5465,8 @@ static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl = ddraw_surface7_GetLOD, }; -static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = { /* IUnknown */ ddraw_surface4_QueryInterface, @@ -5518,7 +5520,8 @@ static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl = ddraw_surface4_ChangeUniquenessValue, }; -static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = { /* IUnknown */ ddraw_surface3_QueryInterface, @@ -5566,7 +5569,8 @@ static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl = ddraw_surface3_SetSurfaceDesc, }; -static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl = +/* Some windowed mode wrappers expect this vtbl to be writable. */ +static struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl = { /* IUnknown */ ddraw_surface2_QueryInterface,