-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2015-09-23 um 10:27 schrieb Riccardo Bortolato:
sub_resource = wined3d_texture_get_sub_resource(surface_impl->wined3d_texture, surface_impl->sub_resource_idx);
wined3d_surface = wined3d_surface_from_resource(sub_resource);
if (FAILED(hr = wined3d_surface_getdc(wined3d_surface, &surface_dc)))
I expect the getdc call to fail because the application already called GetDC. I think you can just add a HDC dc field to struct wined3d_surface and compare it to the dc passed to GetSurfaceFromDC.
- if (!hdc) {
}TRACE("No surface found for dc %p.\n", hdc); *Surface = NULL; return DDERR_NOTFOUND;
Personally I prefer to write a WARN if we return failure to the application. Note that this is just my personal choice though, the existing code is not consistent here.