DXGL r656 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r655‎ | r656 | r657 >
Date:01:13, 19 May 2016
Author:admin
Status:new
Tags:
Comment:
Fix GDI access on primary surface.
Adjust description of random noise test.
Modified paths:
  • /ddraw/glDirectDrawSurface.cpp (modified) (history)
  • /dxgltest/dxgltest.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirectDrawSurface.cpp
@@ -1148,6 +1148,18 @@
11491149 if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
11501150 if(!hDC) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
11511151 HRESULT error = glTexture_ReleaseDC(this->texture, this->miplevel, hDC);
 1152+ if (((ddsd.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER)) &&
 1153+ (ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) ||
 1154+ ((ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) &&
 1155+ !(ddsd.ddsCaps.dwCaps & DDSCAPS_FLIP)))
 1156+ {
 1157+ if (ddInterface->lastsync)
 1158+ {
 1159+ RenderScreen(texture, this, 1);
 1160+ ddInterface->lastsync = false;
 1161+ }
 1162+ else RenderScreen(texture, this, 0);
 1163+ }
11521164 TRACE_EXIT(23,error);
11531165 return error;
11541166 }
Index: dxgltest/dxgltest.cpp
@@ -220,7 +220,7 @@
221221 const TEST_ITEM Tests2D[] =
222222 { // minver maxver buffermin max usesfps defaultfps usestexture usesfsaa name
223223 {1, 7, 0, 4, true, 1.0, false, false, _T("Color palette and gradient screens (direct surface access)")},
224 - {1, 7, 0, 1, false, 0.0, false, false, _T("Random noise (direct surface access speed test)")},
 224+ {1, 7, 0, 1, false, 0.0, false, false, _T("Random noise (continuous surface upload)")},
225225 {1, 7, 0, 7, true, 1.0, false, false, _T("GDI Test patterns (GetDC() test)")},
226226 {1, 7, 0, 0, false, 0.0, false, false, _T("Random GDI patterns (does not clear screen between paints)")},
227227 {1, 7, 0, 1, true, 60.0, false, false, _T("BltFast background and sprites")},