DXGL r319 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r318‎ | r319 | r320 >
Date:00:27, 8 February 2013
Author:admin
Status:new
Tags:
Comment:
Fix IDirect3DSurface initialization.
Ignore DDPF_LUMINANCE and DDPF_ALPHA surface formats in old EnumTextureFormats calls.
Modified paths:
  • /ddraw/glDirect3DDevice.cpp (modified) (history)
  • /ddraw/glDirect3DTexture.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DDevice.cpp
@@ -2372,6 +2372,8 @@
23732373
23742374 HRESULT WINAPI EnumTex2(LPDDPIXELFORMAT ddpf, LPVOID lpUserArg)
23752375 {
 2376+ if(ddpf->dwFlags & DDPF_LUMINANCE) return D3DENUMRET_OK;
 2377+ if(ddpf->dwFlags & DDPF_ALPHA) return D3DENUMRET_OK;
23762378 int *args = (int*)lpUserArg;
23772379 LPD3DENUMTEXTUREFORMATSCALLBACK callback = (LPD3DENUMTEXTUREFORMATSCALLBACK)args[0];
23782380 DDSURFACEDESC ddsd;
Index: ddraw/glDirect3DTexture.cpp
@@ -88,7 +88,8 @@
8989
9090 glDirect3DTexture1::glDirect3DTexture1(glDirectDrawSurface7 *glDDS7)
9191 {
92 - glDDS7->Release();
 92+ this->glDDS7 = glDDS7;
 93+ refcount = 1;
9394 }
9495 glDirect3DTexture1::~glDirect3DTexture1()
9596 {