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
6f929659
Commit
6f929659
authored
Feb 01, 2003
by
Andrew John Hughes
Committed by
Alexandre Julliard
Feb 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended SetSystemPaletteUse to deal with error conditions.
parent
043680c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
wingdi.h
include/wingdi.h
+5
-4
palette.c
objects/palette.c
+15
-3
No files found.
include/wingdi.h
View file @
6f929659
...
@@ -1386,10 +1386,11 @@ typedef struct
...
@@ -1386,10 +1386,11 @@ typedef struct
#define TT_POLYGON_TYPE 24
#define TT_POLYGON_TYPE 24
/* Get/SetSystemPaletteUse() values */
/* Get/SetSystemPaletteUse() values */
#define SYSPAL_ERROR 0
#define SYSPAL_ERROR 0
#define SYSPAL_STATIC 1
#define SYSPAL_STATIC 1
#define SYSPAL_NOSTATIC 2
#define SYSPAL_NOSTATIC 2
#define SYSPAL_NOSTATIC256 3
#ifndef _PALETTEENTRY_DEFINED
#ifndef _PALETTEENTRY_DEFINED
#define _PALETTEENTRY_DEFINED
#define _PALETTEENTRY_DEFINED
typedef
struct
tagPALETTEENTRY
typedef
struct
tagPALETTEENTRY
...
...
objects/palette.c
View file @
6f929659
...
@@ -454,9 +454,21 @@ UINT WINAPI SetSystemPaletteUse(
...
@@ -454,9 +454,21 @@ UINT WINAPI SetSystemPaletteUse(
UINT
use
)
/* [in] Palette-usage flag */
UINT
use
)
/* [in] Palette-usage flag */
{
{
UINT
old
=
SystemPaletteUse
;
UINT
old
=
SystemPaletteUse
;
FIXME
(
"(%p,%04x): stub
\n
"
,
hdc
,
use
);
SystemPaletteUse
=
use
;
/* Device doesn't support colour palettes */
return
old
;
if
(
!
(
GetDeviceCaps
(
hdc
,
RASTERCAPS
)
&
RC_PALETTE
))
{
return
SYSPAL_ERROR
;
}
switch
(
use
)
{
case
SYSPAL_NOSTATIC
:
case
SYSPAL_NOSTATIC256
:
/* WINVER >= 0x0500 */
case
SYSPAL_STATIC
:
SystemPaletteUse
=
use
;
return
old
;
default:
return
SYSPAL_ERROR
;
}
}
}
...
...
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