libobs-d3d11: Fix uint -> HWND casting

HWND is considered a pointer, so when casting you must cast to a
pointer-sized integer before attempting to cast to a pointer.
This commit is contained in:
jp9000 2015-02-09 01:16:27 -08:00
parent 86563ea1cd
commit 3812393472

View file

@ -167,7 +167,7 @@ gs_texture_2d::gs_texture_2d(gs_device_t *device, uint32_t handle)
sharedHandle (handle)
{
HRESULT hr;
hr = device->device->OpenSharedResource((HANDLE)handle,
hr = device->device->OpenSharedResource((HANDLE)(uintptr_t)handle,
__uuidof(ID3D11Texture2D), (void**)texture.Assign());
if (FAILED(hr))
throw HRError("Failed to open resource", hr);