> + hr = IDirectDrawSurface_AddAttachedSurface(Primary, Backbuffer);
> + todo_wine ok(hr == DD_OK || broken(hr == DDERR_CANNOTATTACHSURFACE),
> + "Attaching a back buffer to a front buffer returned %08x\n", hr);
The patch looks OK. Out of curiosity, which windows system returns DDERR_CANNOTATTACHSURFACE? Allowing this result with broken() is OK since you have an application that depends on this behavior.