wow64win: Fix NtGdiDdDDICreateDevice thunk.

This commit is contained in:
Jacek Caban 2022-08-18 01:15:13 +02:00 committed by Alexandre Julliard
parent 50bbaf9d5e
commit a17bb304a0

View file

@ -239,23 +239,20 @@ NTSTATUS WINAPI wow64_NtGdiDdDDICreateDevice( UINT *args )
UINT PatchLocationListSize;
} *desc32 = get_ptr( &args );
D3DKMT_CREATEDEVICE desc =
{
{ desc32->hAdapter },
desc32->Flags
};
D3DKMT_CREATEDEVICE desc;
NTSTATUS status;
if (!desc32) return STATUS_INVALID_PARAMETER;
desc.hAdapter = desc32->hAdapter;
desc.Flags = desc32->Flags;
desc.pCommandBuffer = UlongToPtr( desc32->pCommandBuffer );
desc.CommandBufferSize = desc32->CommandBufferSize;
desc.pAllocationList = UlongToPtr( desc32->pAllocationList );
desc.AllocationListSize = desc32->AllocationListSize;
desc.pPatchLocationList = UlongToPtr( desc32->pPatchLocationList );
desc.PatchLocationListSize = desc32->PatchLocationListSize;
if (!(status = NtGdiDdDDICreateDevice( &desc )))
{
desc32->hDevice = desc.hDevice;
desc32->pCommandBuffer = PtrToUlong( desc.pCommandBuffer );
desc32->CommandBufferSize = desc.CommandBufferSize;
desc32->pAllocationList = PtrToUlong( desc.pAllocationList );
desc32->AllocationListSize = desc.AllocationListSize;
desc32->pPatchLocationList = PtrToUlong( desc.pPatchLocationList );
desc32->PatchLocationListSize = desc.PatchLocationListSize;
}
return status;
}