Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9c90cc89
Commit
9c90cc89
authored
May 29, 2002
by
Gregg Mattinson
Committed by
Alexandre Julliard
May 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced 0 by -1 to indicate free entry in
X11DRV_PALETTE_XPixelToPalette.
parent
d736e822
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
palette.c
graphics/x11drv/palette.c
+6
-3
No files found.
graphics/x11drv/palette.c
View file @
9c90cc89
...
@@ -93,6 +93,7 @@ int X11DRV_PALETTE_mapEGAPixel[16];
...
@@ -93,6 +93,7 @@ int X11DRV_PALETTE_mapEGAPixel[16];
/**********************************************************************/
/**********************************************************************/
#define NB_COLORCUBE_START_INDEX 63
#define NB_COLORCUBE_START_INDEX 63
#define NB_PALETTE_EMPTY_VALUE -1
/* Maps entry in the system palette to X pixel value */
/* Maps entry in the system palette to X pixel value */
int
*
X11DRV_PALETTE_PaletteToXPixel
=
NULL
;
int
*
X11DRV_PALETTE_PaletteToXPixel
=
NULL
;
...
@@ -566,11 +567,13 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
...
@@ -566,11 +567,13 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
if
(
screen_depth
<=
8
)
if
(
screen_depth
<=
8
)
{
{
X11DRV_PALETTE_XPixelToPalette
=
(
int
*
)
calloc
(
256
,
sizeof
(
int
)
);
X11DRV_PALETTE_XPixelToPalette
=
HeapAlloc
(
GetProcessHeap
(),
0
,
256
*
sizeof
(
int
)
);
if
(
X11DRV_PALETTE_XPixelToPalette
==
NULL
)
{
if
(
X11DRV_PALETTE_XPixelToPalette
==
NULL
)
{
ERR
(
"Out of memory: XPixelToPalette!
\n
"
);
ERR
(
"Out of memory: XPixelToPalette!
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
for
(
i
=
0
;
i
<
256
;
i
++
)
X11DRV_PALETTE_XPixelToPalette
[
i
]
=
NB_PALETTE_EMPTY_VALUE
;
}
}
/* for hicolor visuals PaletteToPixel mapping is used to skip
/* for hicolor visuals PaletteToPixel mapping is used to skip
...
@@ -587,7 +590,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
...
@@ -587,7 +590,7 @@ static BOOL X11DRV_PALETTE_BuildSharedMap(void)
{
{
if
(
i
>=
COLOR_gapStart
&&
i
<=
COLOR_gapEnd
)
if
(
i
>=
COLOR_gapStart
&&
i
<=
COLOR_gapEnd
)
{
{
X11DRV_PALETTE_PaletteToXPixel
[
i
]
=
0
;
X11DRV_PALETTE_PaletteToXPixel
[
i
]
=
NB_PALETTE_EMPTY_VALUE
;
COLOR_sysPal
[
i
].
peFlags
=
0
;
/* mark as unused */
COLOR_sysPal
[
i
].
peFlags
=
0
;
/* mark as unused */
continue
;
continue
;
}
}
...
@@ -691,7 +694,7 @@ static void X11DRV_PALETTE_FillDefaultColors(void)
...
@@ -691,7 +694,7 @@ static void X11DRV_PALETTE_FillDefaultColors(void)
max
=
COLOR_max
-
(
256
-
(
COLOR_gapEnd
-
COLOR_gapStart
));
max
=
COLOR_max
-
(
256
-
(
COLOR_gapEnd
-
COLOR_gapStart
));
for
(
i
=
0
,
idx
=
COLOR_gapStart
;
i
<
256
&&
idx
<=
COLOR_gapEnd
;
i
++
)
for
(
i
=
0
,
idx
=
COLOR_gapStart
;
i
<
256
&&
idx
<=
COLOR_gapEnd
;
i
++
)
if
(
X11DRV_PALETTE_XPixelToPalette
[
i
]
==
0
)
if
(
X11DRV_PALETTE_XPixelToPalette
[
i
]
==
NB_PALETTE_EMPTY_VALUE
)
{
{
xc
.
pixel
=
i
;
xc
.
pixel
=
i
;
...
...
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