From 0842a21fd3a43643af3c7ff543804ad2823a91d4 Mon Sep 17 00:00:00 2001 From: Nathan Williams Date: Sat, 31 Mar 2007 10:05:39 +1000 Subject: Fixing power of 2 assumptions in the OpenGL ddraw renderer --- dlls/wined3d/surface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 8ac924b..6b6c70d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -955,7 +955,6 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This) { case WINED3DFMT_P8: { - int height = This->glRect.bottom - This->glRect.top; type = GL_UNSIGNED_BYTE; fmt = GL_RGBA; @@ -969,7 +968,7 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This) { mem, pitch, pitch, - height, + This->currentDesc.Height, pitch * 4, CONVERT_PALETTED, This); @@ -3194,6 +3193,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { } else { /* No oversize, gl rect is the full texture size */ This->Flags &= ~SFLAG_OVERSIZE; + This->Flags &= SFLAG_NONPOW2; This->glRect.left = 0; This->glRect.top = 0; This->glRect.right = This->pow2Width; -- 1.4.4.4