Stefan Dösinger (@stefan) commented about dlls/d3drm/tests/d3drm.c:
- hr = IDirect3DRMViewport2_ForceUpdate(viewport, vrect.left, vrect.top, vrect.right, vrect.bottom);
- todo_wine ok(hr == D3DRM_OK, "Cannot force update of viewport, hr %#lx.\n", hr);
- /* Update just to flush force updates */
- hr = IDirect3DRMDevice3_Update(device3);
- ok(hr == D3DRM_OK, "Cannot update Direct3DRMDevice3, hr %#lx.\n", hr);
- /* Callbacks will receive (at least) one rectangle following a force update */
- ctx.rect.x1 = ctx.rect.y1 = ctx.rect.x2 = ctx.rect.y2 = ~0;
- ctx.rect_count = -1;
- hr = IDirect3DRMViewport2_ForceUpdate(viewport, vrect.left, vrect.top, vrect.right, vrect.bottom);
- todo_wine ok(hr == D3DRM_OK, "Cannot force update of viewport, hr %#lx.\n", hr);
- hr = IDirect3DRMDevice3_AddUpdateCallback(device3, update_cb_modify_rect, NULL);
- todo_wine ok(hr == D3DRM_OK, "Cannot add update callback, hr %#lx.\n", hr);
- hr = IDirect3DRMDevice3_AddUpdateCallback(device3, update_cb_get_rect, &ctx);
- todo_wine ok(hr == D3DRM_OK, "Cannot add update callback, hr %#lx.\n", hr);
- hr = IDirect3DRMDevice3_Update(device3);
Do I understand this right: ForceUpdate doesn't update itself, it just adds a dirty rectangle that the next Update() call will process?
That would make sense, and since you add the callbacks after Viewport::ForceUpdate() but before Device::Update() it must be the case.