2 Oct
2025
2 Oct
'25
11:37 p.m.
Brendan Shanks (@bshanks) commented about dlls/winemac.drv/cocoa_display.m:
+static unsigned int generate_edid(const struct macdrv_display *display, unsigned char **prop) +{ + struct display_param { + size_t width; + size_t height; + double refresh; + } best_params[3]; + double mwidth, mheight, refresh; + CGDisplayModeRef mode = NULL; + size_t width = 0, height = 0; + uint8_t edid[128], sum, *p; + int i, j, timings = 0; + CGSize screen_size; + CFArrayRef modes; + + *prop = malloc(128); Could `edid` just point to the calloc-ed buffer, and have `*prop = edid` at the end, that way you avoid the memset and memcpy?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8925#note_117490