mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs-d3d11: Use integer type with switch
DXGI_FORMAT has too many values we don't need/use, so the value for this switch should be an integer instead of an enum to prevent warnings.
This commit is contained in:
@@ -84,7 +84,7 @@ static inline DXGI_FORMAT ConvertGSTextureFormat(gs_color_format format)
|
||||
|
||||
static inline gs_color_format ConvertDXGITextureFormat(DXGI_FORMAT format)
|
||||
{
|
||||
switch (format) {
|
||||
switch ((unsigned long)format) {
|
||||
case DXGI_FORMAT_A8_UNORM: return GS_A8;
|
||||
case DXGI_FORMAT_R8_UNORM: return GS_R8;
|
||||
case DXGI_FORMAT_R8G8B8A8_UNORM: return GS_RGBA;
|
||||
|
||||
Reference in New Issue
Block a user