DXGL r657 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r656‎ | r657 | r658 >
Date:00:33, 22 May 2016
Author:admin
Status:new
Tags:
Comment:
Fix GetDC on 8-bit offscreen surface
Get miplevel for Blt source
Modified paths:
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDrawSurface.cpp
@@ -1052,7 +1052,7 @@
10531053 if (palette) pal = palette;
10541054 else pal = ddInterface->primary->palette;
10551055 }
1056 - error = glTexture_GetDC(this->texture, this->miplevel, lphDC, this->palette);
 1056+ error = glTexture_GetDC(this->texture, this->miplevel, lphDC, pal);
10571057 if (SUCCEEDED(error)) { TRACE_VAR("*lphDC", 14, *lphDC); }
10581058 TRACE_EXIT(23,error);
10591059 return error;
Index: ddraw/glRenderer.cpp
@@ -1397,7 +1397,7 @@
13981398 if (src)
13991399 {
14001400 src->GetSurfaceDesc(&ddsdSrc);
1401 - if (src->texture->levels[0].dirty & 1) glTexture__Upload(src->texture, 0);
 1401+ if (src->texture->levels[src->miplevel].dirty & 1) glTexture__Upload(src->texture, src->miplevel);
14021402 }
14031403 if(!lpSrcRect)
14041404 {