DXGL r857 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r856
|
r857
|
r858
>
Date:
20:26, 7 September 2018
Author:
admin
Status:
new
Tags:
Comment:
Use DDPCAPS_PRIMARYSURFACE to track palette attachment.
Modified paths:
/ddraw/glDirectDrawPalette.c
(modified) (
history
)
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
/ddraw/struct.h
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDrawPalette.c
—
—
@@ -244,7 +244,7 @@
245
245
memcpy(ddsd.lpSurface, This->palette, 1024);
246
246
glTexture_Unlock(This->texture, 0, NULL, FALSE);
247
247
}
248
- if ((This->primary) && (This->surface))
248
+ if ((This->flags & DDPCAPS_PRIMARYSURFACE) && (This->surface))
249
249
{
250
250
if (!dxglcfg.DebugNoPaletteRedraw)
251
251
{
—
—
@@ -300,7 +300,6 @@
301
301
newpal->lpVtbl = &glDirectDrawPalette_iface;
302
302
newpal->creator = NULL;
303
303
newpal->texture = NULL;
304
- newpal->primary = FALSE;
305
304
newpal->surface = NULL;
306
305
newpal->timer = NULL;
307
306
if (lpDDColorArray == NULL)
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -1509,7 +1509,7 @@
1510
1510
{
1511
1511
if (palette)
1512
1512
{
1513
- palette->primary = FALSE;
1513
+ palette->flags &= ~DDPCAPS_PRIMARYSURFACE;
1514
1514
palette->surface = NULL;
1515
1515
palette->timer = NULL;
1516
1516
glDirectDrawPalette_Release(palette);
—
—
@@ -1521,13 +1521,13 @@
1522
1522
glDirectDrawPalette_AddRef(palette);
1523
1523
if (this->ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
1524
1524
{
1525
- palette->primary = TRUE;
1525
+ palette->flags |= DDPCAPS_PRIMARYSURFACE;
1526
1526
palette->surface = this;
1527
1527
palette->timer = &ddInterface->renderer->timer;
1528
1528
}
1529
1529
else
1530
1530
{
1531
- palette->primary = FALSE;
1531
+ palette->flags &= ~DDPCAPS_PRIMARYSURFACE;
1532
1532
palette->surface = NULL;
1533
1533
palette->timer = NULL;
1534
1534
}
—
—
@@ -1562,7 +1562,7 @@
1563
1563
{
1564
1564
if (palette)
1565
1565
{
1566
- palette->primary = FALSE;
1566
+ palette->flags &= ~DDPCAPS_PRIMARYSURFACE;
1567
1567
palette->surface = NULL;
1568
1568
palette->timer = NULL;
1569
1569
glDirectDrawPalette_Release(palette);
—
—
@@ -1574,13 +1574,13 @@
1575
1575
glDirectDrawPalette_AddRef(palette);
1576
1576
if (this->ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
1577
1577
{
1578
- palette->primary = TRUE;
1578
+ palette->flags |= DDPCAPS_PRIMARYSURFACE;
1579
1579
palette->surface = this;
1580
1580
palette->timer = &ddInterface->renderer->timer;
1581
1581
}
1582
1582
else
1583
1583
{
1584
- palette->primary = FALSE;
1584
+ palette->flags &= ~DDPCAPS_PRIMARYSURFACE;
1585
1585
palette->surface = NULL;
1586
1586
palette->timer = NULL;
1587
1587
}
Index: ddraw/struct.h
—
—
@@ -418,7 +418,6 @@
419
419
glTexture *texture;
420
420
DWORD flags;
421
421
IUnknown *creator;
422
- BOOL primary;
423
422
LPDIRECTDRAWSURFACE7 surface;
424
423
DXGLTimer *timer;
425
424
} glDirectDrawPalette;
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