16 Aug
2022
16 Aug
'22
12:04 p.m.
From patch 2/2:
@@ -3832,10 +3833,17 @@ static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
return DDERR_WRONGMODE;
surface->is_lost = FALSE;
+
for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
{
- if (surface->complex_array[i])
- surface->complex_array[i]->is_lost = FALSE;
+ attachment = surface->complex_array[i];
+ while (attachment)
+ {
+ attachment->is_lost = FALSE;
+ attachment = attachment->complex_array[0];
+ if (attachment == surface->complex_array[i])
+ break;
+ }
}
return DD_OK;
Does that do the right thing? I don't think that iterates over any surfaces it previously didn't. I'd expect an `attachment = attachment->next_attached` somewhere in there. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/650#note_6295