DXGL r619 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r618
|
r619
|
r620
>
Date:
13:44, 27 September 2015
Author:
admin
Status:
new
Tags:
Comment:
Cleanup texture DIB on delete.
Fix 8-bit surface format and resulting DIB structure heap corruption.
Modified paths:
/ddraw/glRenderer.cpp
(modified) (
history
)
/ddraw/glTexture.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glRenderer.cpp
—
—
@@ -270,8 +270,8 @@
271
271
{
272
272
GetClientRect(This->hWnd,&r);
273
273
GetClientRect(This->RenderWnd->GetHWnd(),&r2);
274
- if(memcmp(&r2,&r,sizeof(RECT)))
275
- SetWindowPos(This->RenderWnd->GetHWnd(),NULL,0,0,r.right,r.bottom,SWP_SHOWWINDOW);
274
+ if(memcmp(&r2,&r,sizeof(RECT)) != 0)
275
+ SetWindowPos(This->RenderWnd->GetHWnd(),NULL,0,0,r.right,r.bottom,SWP_SHOWWINDOW);
276
276
}
277
277
This->inputs[0] = cmd;
278
278
This->opcode = OP_BLT;
—
—
@@ -2983,7 +2983,7 @@
2984
2984
2985
2985
void glRenderer__SetMaterial(glRenderer *This, LPD3DMATERIAL7 lpMaterial)
2986
2986
{
2987
- memcpy(&This->material, lpMaterial, sizeof(D3DMATERIAL));
2987
+ memcpy(&This->material, lpMaterial, sizeof(D3DMATERIAL7));
2988
2988
SetEvent(This->busy);
2989
2989
}
2990
2990
Index: ddraw/glTexture.cpp
—
—
@@ -104,7 +104,7 @@
105
105
switch (screenbpp)
106
106
{
107
107
case 8:
108
- (*texture)->ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB & DDPF_PALETTEINDEXED8;
108
+ (*texture)->ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8;
109
109
(*texture)->ddsd.ddpfPixelFormat.dwRBitMask = 0;
110
110
(*texture)->ddsd.ddpfPixelFormat.dwGBitMask = 0;
111
111
(*texture)->ddsd.ddpfPixelFormat.dwBBitMask = 0;
—
—
@@ -572,7 +572,7 @@
573
573
if (texture->mipmaps[i].buffer && !texture->clientmem && !i) free(texture->mipmaps[i].buffer);
574
574
if (texture->mipmaps[i].bigbuffer) free(texture->mipmaps[i].bigbuffer);
575
575
if (texture->mipmaps[i].gdibuffer) {}
576
- if (texture->mipmaps[i].dib.hdc) {}
576
+ if (texture->mipmaps[i].dib.hdc) glTexture__DeleteDIB(texture, i);
577
577
if (texture->mipmaps[i].fbo.fbo) glUtil_DeleteFBO(texture->util,&texture->mipmaps[i].fbo);
578
578
}
579
579
if (texture->bigid) glDeleteTextures(1, &texture->bigid);
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version