libobs-d3d11: Fill out switch enum values

When using an enumeration value with a switch, it needs to be filled out
with all possible values to prevent compiler warnings.  This warning is
used to prevent the developer from unintentionally forgetting to add new
enum values to any switches the enum is used on later on.  Sadly, only
good compilers actually have this warning (mingw).
This commit is contained in:
jp9000
2015-02-09 01:05:01 -08:00
parent 1b2c3a6176
commit 7650df5525
2 changed files with 9 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ static inline uint32_t GetWinVer()
static inline DXGI_FORMAT ConvertGSTextureFormat(gs_color_format format)
{
switch (format) {
case GS_UNKNOWN: return DXGI_FORMAT_UNKNOWN;
case GS_A8: return DXGI_FORMAT_A8_UNORM;
case GS_R8: return DXGI_FORMAT_R8_UNORM;
case GS_RGBA: return DXGI_FORMAT_R8G8B8A8_UNORM;
@@ -109,6 +110,7 @@ static inline gs_color_format ConvertDXGITextureFormat(DXGI_FORMAT format)
static inline DXGI_FORMAT ConvertGSZStencilFormat(gs_zstencil_format format)
{
switch (format) {
case GS_ZS_NONE: return DXGI_FORMAT_UNKNOWN;
case GS_Z16: return DXGI_FORMAT_D16_UNORM;
case GS_Z24_S8: return DXGI_FORMAT_D24_UNORM_S8_UINT;
case GS_Z32F: return DXGI_FORMAT_D32_FLOAT;