DXGL r257 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r256
|
r257
|
r258
>
Date:
01:37, 5 September 2012
Author:
admin
Status:
new
Tags:
Comment:
Fix COM initialization.
Fix QueryInterface on IDirectDraw interfaces after a legacy version's reference count drops to zero.
Fix RGB555 color format regression.
Modified paths:
/ddraw/glClassFactory.cpp
(modified) (
history
)
/ddraw/glDirectDraw.cpp
(modified) (
history
)
/ddraw/texture.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glClassFactory.cpp
—
—
@@ -62,7 +62,7 @@
63
63
if(riid == IID_IDirectDraw)
64
64
{
65
65
glDD7 = new glDirectDraw7;
66
- *ppvObject = new glDirectDraw1(glDD7);
66
+ glDD7->QueryInterface(IID_IDirectDraw,ppvObject);
67
67
glDD7->Release();
68
68
return S_OK;
69
69
}
—
—
@@ -69,7 +69,7 @@
70
70
if(riid == IID_IDirectDraw2)
71
71
{
72
72
glDD7 = new glDirectDraw7;
73
- *ppvObject = new glDirectDraw2(glDD7);
73
+ glDD7->QueryInterface(IID_IDirectDraw2,ppvObject);
74
74
glDD7->Release();
75
75
return S_OK;
76
76
}
—
—
@@ -76,7 +76,7 @@
77
77
if(riid == IID_IDirectDraw4)
78
78
{
79
79
glDD7 = new glDirectDraw7;
80
- *ppvObject = new glDirectDraw4(glDD7);
80
+ glDD7->QueryInterface(IID_IDirectDraw4,ppvObject);
81
81
glDD7->Release();
82
82
return S_OK;
83
83
}
Index: ddraw/glDirectDraw.cpp
—
—
@@ -549,6 +549,9 @@
550
550
551
551
glDirectDraw7::glDirectDraw7()
552
552
{
553
+ glDD1 = NULL;
554
+ glDD2 = NULL;
555
+ glDD4 = NULL;
553
556
glD3D7 = NULL;
554
557
clippers = NULL;
555
558
surfaces = NULL;
—
—
@@ -1460,6 +1463,7 @@
1461
1464
glDirectDraw1::~glDirectDraw1()
1462
1465
{
1463
1466
glDD7->Release();
1467
+ glDD7->glDD1 = NULL;
1464
1468
}
1465
1469
HRESULT WINAPI glDirectDraw1::QueryInterface(REFIID riid, void** ppvObj)
1466
1470
{
—
—
@@ -1607,6 +1611,7 @@
1608
1612
glDirectDraw2::~glDirectDraw2()
1609
1613
{
1610
1614
glDD7->Release();
1615
+ glDD7->glDD2 = NULL;
1611
1616
}
1612
1617
HRESULT WINAPI glDirectDraw2::QueryInterface(REFIID riid, void** ppvObj)
1613
1618
{
—
—
@@ -1765,6 +1770,7 @@
1766
1771
glDirectDraw4::~glDirectDraw4()
1767
1772
{
1768
1773
glDD7->Release();
1774
+ glDD7->glDD4 = NULL;
1769
1775
}
1770
1776
HRESULT WINAPI glDirectDraw4::QueryInterface(REFIID riid, void** ppvObj)
1771
1777
{
Index: ddraw/texture.cpp
—
—
@@ -85,7 +85,7 @@
86
86
FIXME("Untested texture format RGB332\n");
87
87
break;
88
88
case 2: // 16-bit RGB555
89
- texture->internalformat = GL_RGB5;
89
+ texture->internalformat = GL_RGB5_A1;
90
90
texture->format = GL_BGRA;
91
91
texture->type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
92
92
break;
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