Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/display.c:
return DISP_CHANGE_BADMODE; }
if (!write_registry_settings(devname, full_mode))
{
ERR("Failed to write %s display settings to registry.\n", wine_dbgstr_w(devname));
free_full_mode(full_mode);
free(displays);
return DISP_CHANGE_NOTUPDATED;
}
*devmode = *full_mode;
Be very careful about dmDriverExtra. You are losing private driver data here. "memcpy(full_mode, found_mode, sizeof(*found_mode) + found_mode->dmDriverExtra)" is how full mode is populated.