Module: wine Branch: master Commit: db36665be5adaf7cbf99819ccead13437fd520b0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=db36665be5adaf7cbf99819cce...
Author: Alexander Dorofeyev alexd4@inbox.lv Date: Sat Apr 19 00:41:58 2008 +0300
wined3d: Add missing check for p8 primary in surface_download_data.
---
dlls/wined3d/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 7da9d92..e024b8d 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; }