Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1b78457b
Commit
1b78457b
authored
Jan 29, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure to set the color key when it is needed including for index_in_alpha.
parent
41848c82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
surface.c
dlls/wined3d/surface.c
+14
-17
No files found.
dlls/wined3d/surface.c
View file @
1b78457b
...
...
@@ -1930,15 +1930,14 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4]
table
[
i
][
1
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peGreen
;
table
[
i
][
2
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peBlue
;
if
(
index_in_alpha
)
{
/* BltOverride uses a GL_ALPHA_TEST based on GL_NOT_EQUAL 0, so the alpha component
of pixels that should be masked away should be 0. When inde_in_alpha is set,
we will store the palette index (the glReadPixels code reads GL_ALPHA back)
or else we store 0xff. */
if
(
colorkey
&&
(
i
>=
This
->
SrcBltCKey
.
dwColorSpaceLowValue
)
&&
(
i
<=
This
->
SrcBltCKey
.
dwColorSpaceHighValue
))
{
table
[
i
][
3
]
=
0
;
}
else
if
(
index_in_alpha
)
{
table
[
i
][
3
]
=
i
;
}
else
if
(
colorkey
&&
(
i
>=
This
->
SrcBltCKey
.
dwColorSpaceLowValue
)
&&
(
i
<=
This
->
SrcBltCKey
.
dwColorSpaceHighValue
))
{
/* We should maybe here put a more 'neutral' color than the standard bright purple
one often used by application to prevent the nice purple borders when bi-linear
filtering is on */
table
[
i
][
3
]
=
0x00
;
}
else
{
table
[
i
][
3
]
=
0xFF
;
}
...
...
@@ -1951,16 +1950,14 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4]
table
[
i
][
1
]
=
pal
->
palents
[
i
].
peGreen
;
table
[
i
][
2
]
=
pal
->
palents
[
i
].
peBlue
;
if
(
index_in_alpha
)
{
table
[
i
][
3
]
=
i
;
}
else
if
(
colorkey
&&
(
i
>=
This
->
SrcBltCKey
.
dwColorSpaceLowValue
)
&&
(
i
<=
This
->
SrcBltCKey
.
dwColorSpaceHighValue
))
{
/* We should maybe here put a more 'neutral' color than the standard bright purple
one often used by application to prevent the nice purple borders when bi-linear
filtering is on */
/* BltOverride uses a GL_ALPHA_TEST based on GL_NOT_EQUAL 0, so the alpha component
of pixels that should be masked away should be 0. When inde_in_alpha is set,
we will store the palette index (the glReadPixels code reads GL_ALPHA back)
or else we store 0xff. */
if
(
colorkey
&&
(
i
>=
This
->
SrcBltCKey
.
dwColorSpaceLowValue
)
&&
(
i
<=
This
->
SrcBltCKey
.
dwColorSpaceHighValue
))
{
table
[
i
][
3
]
=
0x00
;
}
else
if
(
index_in_alpha
)
{
table
[
i
][
3
]
=
i
;
}
else
if
(
pal
->
Flags
&
WINEDDPCAPS_ALPHA
)
{
table
[
i
][
3
]
=
pal
->
palents
[
i
].
peFlags
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment