From fbf881ecdda82fb29a821273d383a44fa0c03ba7 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 8 Feb 2015 16:29:56 -0800 Subject: [PATCH] win-capture: Fix enum switch warnings The enum switch warning is used to signify when you are missing enum values. --- plugins/win-capture/graphics-hook/d3d9-capture.cpp | 2 +- plugins/win-capture/graphics-hook/dxgi-helpers.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: