From 0ea16b413e5207c1beb695ff631b5be8bdc8607d Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 9 Oct 2012 07:21:20 +0000 Subject: [PATCH] gpu: D3DFMT_R8G8B8 doesn't seem to exist on the X360. --- src/gpu/texture.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gpu/texture.cpp b/src/gpu/texture.cpp index b8982a8b..1290c738 100644 --- a/src/gpu/texture.cpp +++ b/src/gpu/texture.cpp @@ -71,13 +71,17 @@ Texture::Texture(ivec2 size, PixelFormat format) m_data->m_format = format; #if defined USE_D3D9 || defined _XBOX - static int const d3d_formats[] = + static D3DFORMAT const d3d_formats[] = { /* Unknown */ D3DFMT_UNKNOWN, /* R8G8B8 */ +# if defined USE_D3D9 D3DFMT_R8G8B8, +# else + D3DFMT_UNKNOWN, +# endif /* A8R8G8B8 */ # if defined USE_D3D9 @@ -88,7 +92,7 @@ Texture::Texture(ivec2 size, PixelFormat format) # endif }; - int d3d_format = GET_CLAMPED(d3d_formats, format); + D3DFORMAT d3d_format = GET_CLAMPED(d3d_formats, format); # if defined USE_D3D9 int d3d_usage = D3DUSAGE_DYNAMIC; # else