Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/display.c:
free(mode); }
-static LONG get_display_settings(struct x11drv_display_setting **new_displays, - INT *new_display_count, const WCHAR *dev_name, DEVMODEW *dev_mode) +static LONG get_display_settings(DEVMODEW **new_displays, const WCHAR *dev_name, DEVMODEW *dev_mode) { - struct x11drv_display_setting *displays; - DEVMODEW registry_mode, current_mode; + struct display_setting + { + DEVMODEW mode; + ULONG_PTR extra; + };
struct display_setting is only used for calculating sizes. I prefer using sizeof(DEVMODEW) + sizeof(ULONG_PTR) instead and adding a comment about the ULONG_PTR id at the end. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/561#note_5414