On Mon, 27 Jul 2020 at 17:21, Gabriel Ivăncescu gabrielopcode@gmail.com wrote:
/* Railroad Tycoon 2 tries to restore the surface from within
a WM_QUERYNEWPALETTE message and expects it to succeed. */
I think the reason we care about that is that while the window has been restored at that point, WM_ACTIVATEAPP hasn't been sent yet; otherwise device_parent_activate() would take care of it. In other words, the comment could use some work.
if (GetForegroundWindow() != window) return DDERR_WRONGMODE;
surface->ddraw->device_state = DDRAW_DEVICE_STATE_NOT_RESTORED;
}
Stray newline.
Like patch 1/2, should this apply to non-primary surfaces as well?