Commit 6f929659 authored by Andrew John Hughes's avatar Andrew John Hughes Committed by Alexandre Julliard

Extended SetSystemPaletteUse to deal with error conditions.

parent 043680c1
...@@ -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
......
...@@ -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;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment