Module: wine Branch: master Commit: e1b1a97fc828af557a130e40d4bfb813d92a0f60 URL: https://gitlab.winehq.org/wine/wine/-/commit/e1b1a97fc828af557a130e40d4bfb81...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri May 31 10:43:05 2024 +0200
winemac: Remove now unnecessary driver surface BITMAPINFO.
---
dlls/winemac.drv/surface.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index 4bc65b957c1..e4f140a898e 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -48,7 +48,6 @@ struct macdrv_window_surface struct window_surface header; macdrv_window window; CGDataProviderRef provider; - BITMAPINFO info; /* variable size, must be last */ };
static struct macdrv_window_surface *get_mac_surface(struct window_surface *surface); @@ -166,9 +165,8 @@ static struct window_surface *create_surface(HWND hwnd, macdrv_window window, co } if (desc.hDeviceDc) NtUserReleaseDC(hwnd, desc.hDeviceDc);
- if (!(surface = calloc(1, FIELD_OFFSET(struct macdrv_window_surface, info.bmiColors[3])))) goto failed; + if (!(surface = calloc(1, sizeof(*surface)))) goto failed; if (!window_surface_init(&surface->header, &macdrv_surface_funcs, hwnd, rect, info, bitmap)) goto failed; - memcpy(&surface->info, info, offsetof(BITMAPINFO, bmiColors[3]));
surface->window = window; if (old_surface) surface->header.bounds = old_surface->bounds;