From 611efea2bf5076e6af7ec55b43a0bd6f6fe0d70f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 22 Mar 2021 15:20:51 +0100 Subject: [PATCH] More CXX_BUILD fixes --- gfx/common/win32_common.c | 2 +- gfx/drivers/d3d10.c | 2 +- gfx/drivers/d3d11.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 5a525d08ef..791d5ba8dc 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1567,7 +1567,7 @@ void win32_clip_window(bool state) if (state && main_window.hwnd) { PWINDOWINFO info; - info = malloc(sizeof(*info)); + info = (PWINDOWINFO)malloc(sizeof(*info)); info->cbSize = sizeof(PWINDOWINFO); if (GetWindowInfo(main_window.hwnd, info)) diff --git a/gfx/drivers/d3d10.c b/gfx/drivers/d3d10.c index 4d95dcce05..260a08a6cc 100644 --- a/gfx/drivers/d3d10.c +++ b/gfx/drivers/d3d10.c @@ -608,7 +608,7 @@ static bool d3d10_init_swapchain(d3d10_video_t *d3d10, desc.BufferDesc.RefreshRate.Denominator = 1; desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; #ifdef HAVE_WINDOW - desc.OutputWindow = corewindow; + desc.OutputWindow = (HWND)corewindow; #endif desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index 19620b0f66..66d45b3b5a 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -661,7 +661,7 @@ static bool d3d11_init_swapchain(d3d11_video_t* d3d11, #endif desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; #ifdef HAVE_WINDOW - desc.OutputWindow = corewindow; + desc.OutputWindow = (HWND)corewindow; #endif desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0;