Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
if (!devmode->dmPelsHeight) devmode->dmPelsHeight = current_mode->dmPelsHeight; }
- return devmode;
- if (is_detached_mode( devmode )) return devmode;
- if ((mode = find_display_mode( modes, devmode )))
- {
mode->dmFields |= DM_POSITION;
This patch is assuming devmode has a valid position, which it might not and should use the current position in that case. You should check for (devmode->dmFields & DM_POSITION) before copying the position. Basically, part of your next patch should be done in this patch.