From patch 2/2: ```diff @@ -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.