From db36665be5adaf7cbf99819ccead13437fd520b0 Mon Sep 17 00:00:00 2001 From: Alexander Dorofeyev Date: Sat, 19 Apr 2008 00:41:58 +0300 Subject: [PATCH] wined3d: Add missing check for p8 primary in surface_download_data. --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7da9d92352..e024b8de24 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -117,7 +117,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) { int dst_pitch = 0; /* In case of P8 the index is stored in the alpha component if the primary render target uses P8 */ - if(This->resource.format == WINED3DFMT_P8) { + if(This->resource.format == WINED3DFMT_P8 && primary_render_target_is_p8(This->resource.wineD3DDevice)) { format = GL_ALPHA; type = GL_UNSIGNED_BYTE; } -- 2.32.0.93.g670b81a890