On 22 October 2015 at 12:01, Riccardo Bortolato rikyz619@gmail.com wrote:
+HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc) +{
- struct wined3d_resource *sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx);
- return wined3d_surface_getdc(surface_from_resource(sub_resource), dc);
+}
I think this should be fairly obvious at this point, but you're missing traces and you need to validate the sub-resource type.
v2 had them (sub-res type validation) but since they were silently discarded I figured you didn't want that.
Ciao, Riccardo
2015-10-27 15:40 GMT+01:00 Henri Verbeet hverbeet@gmail.com:
On 22 October 2015 at 12:01, Riccardo Bortolato rikyz619@gmail.com wrote:
+HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc) +{
- struct wined3d_resource *sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx);
- return wined3d_surface_getdc(surface_from_resource(sub_resource), dc);
+}
I think this should be fairly obvious at this point, but you're missing traces and you need to validate the sub-resource type.