diff --git a/plugins/win-capture/graphics-hook/d3d9-capture.cpp b/plugins/win-capture/graphics-hook/d3d9-capture.cpp index 89d11583f..272e49e2b 100644 --- a/plugins/win-capture/graphics-hook/d3d9-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d9-capture.cpp @@ -98,7 +98,7 @@ static void d3d9_free() static DXGI_FORMAT d3d9_to_dxgi_format(D3DFORMAT format) { - switch (format) { + switch ((unsigned long)format) { case D3DFMT_A2B10G10R10: return DXGI_FORMAT_R10G10B10A2_UNORM; case D3DFMT_A8R8G8B8: return DXGI_FORMAT_B8G8R8A8_UNORM; case D3DFMT_X8R8G8B8: return DXGI_FORMAT_B8G8R8X8_UNORM; diff --git a/plugins/win-capture/graphics-hook/dxgi-helpers.hpp b/plugins/win-capture/graphics-hook/dxgi-helpers.hpp index 65a61065e..5d73bf8eb 100644 --- a/plugins/win-capture/graphics-hook/dxgi-helpers.hpp +++ b/plugins/win-capture/graphics-hook/dxgi-helpers.hpp @@ -2,7 +2,7 @@ static inline DXGI_FORMAT fix_dxgi_format(DXGI_FORMAT format) { - switch (format) { + switch ((unsigned long)format) { case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: return DXGI_FORMAT_B8G8R8A8_UNORM; case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: