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
c9376343
Commit
c9376343
authored
Feb 17, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Feb 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: GetPaletteEntries should not filter peFlags (test included).
parent
1fa9e526
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
palette.c
dlls/gdi32/palette.c
+0
-3
palette.c
dlls/gdi32/tests/palette.c
+26
-0
No files found.
dlls/gdi32/palette.c
View file @
c9376343
...
...
@@ -300,9 +300,6 @@ UINT WINAPI GetPaletteEntries(
}
memcpy
(
entries
,
&
palPtr
->
logpalette
.
palPalEntry
[
start
],
count
*
sizeof
(
PALETTEENTRY
)
);
for
(
numEntries
=
0
;
numEntries
<
count
;
numEntries
++
)
if
(
entries
[
numEntries
].
peFlags
&
0xF0
)
entries
[
numEntries
].
peFlags
=
0
;
}
GDI_ReleaseObj
(
hpalette
);
...
...
dlls/gdi32/tests/palette.c
View file @
c9376343
...
...
@@ -120,7 +120,33 @@ static void test_DIB_PAL_COLORS(void) {
ReleaseDC
(
NULL
,
hdc
);
}
static
void
test_palette_entries
(
void
)
{
char
logpalettebuf
[
sizeof
(
LOGPALETTE
)
+
sizeof
(
logpalettedata
)];
PLOGPALETTE
logpalette
=
(
PLOGPALETTE
)
logpalettebuf
;
HPALETTE
hpal
;
UINT
res
=
0
;
PALETTEENTRY
palEntry
=
{
0x1
,
0x2
,
0x3
,
0xff
};
PALETTEENTRY
getEntryResult
;
/* Initalize the logical palette with a few colours */
logpalette
->
palVersion
=
0x300
;
logpalette
->
palNumEntries
=
8
;
memcpy
(
logpalette
->
palPalEntry
,
logpalettedata
,
sizeof
(
logpalettedata
)
);
hpal
=
CreatePalette
(
logpalette
);
/* Set a new entry with peFlags to 0xff */
SetPaletteEntries
(
hpal
,
0
,
1
,
&
palEntry
);
/* Retrieve the entry to see if GDI32 performs any filtering on peFlags */
res
=
GetPaletteEntries
(
hpal
,
0
,
1
,
&
getEntryResult
);
ok
(
res
==
1
,
"GetPaletteEntries should have returned 1 but returned %d
\n
"
,
res
);
ok
(
palEntry
.
peFlags
==
getEntryResult
.
peFlags
,
"palEntry.peFlags (%#x) != getEntryResult.peFlags (%#x)
\n
"
,
palEntry
.
peFlags
,
getEntryResult
.
peFlags
);
}
START_TEST
(
palette
)
{
test_DIB_PAL_COLORS
();
test_palette_entries
();
}
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