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
...@@ -1389,6 +1389,7 @@ typedef struct ...@@ -1389,6 +1389,7 @@ typedef struct
#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
......
...@@ -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 );
/* Device doesn't support colour palettes */
if (!(GetDeviceCaps(hdc, RASTERCAPS) & RC_PALETTE)) {
return SYSPAL_ERROR;
}
switch (use) {
case SYSPAL_NOSTATIC:
case SYSPAL_NOSTATIC256: /* WINVER >= 0x0500 */
case SYSPAL_STATIC:
SystemPaletteUse = use; SystemPaletteUse = use;
return old; 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