From 5ae22b8021381623b71dff393bab7a69369a4bfe Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Wed, 2 Nov 2005 10:54:42 +0000 Subject: [PATCH] Add 'ENUM_...._SETTINGS' flag and make use of it in the X11DRV code. --- dlls/x11drv/settings.c | 4 ++-- include/winuser.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/x11drv/settings.c b/dlls/x11drv/settings.c index c35b4218bc..3f0996ca11 100644 --- a/dlls/x11drv/settings.c +++ b/dlls/x11drv/settings.c @@ -170,12 +170,12 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW devmode->dmDisplayFlags = 0; devmode->dmDisplayFrequency = 0; devmode->dmSize = sizeof(DEVMODEW); - if (n == (DWORD)-1) + if (n == ENUM_CURRENT_SETTINGS) { TRACE("mode %ld (current) -- getting current mode (%s)\n", n, handler_name); n = pGetCurrentMode(); } - if (n == (DWORD)-2) + if (n == ENUM_REGISTRY_SETTINGS) { TRACE("mode %ld (registry) -- getting default mode (%s)\n", n, handler_name); n = dd_mode_default; diff --git a/include/winuser.h b/include/winuser.h index ad1f0bdbfe..eb5884cee0 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -1304,6 +1304,10 @@ BOOL WINAPI SetSysColors(INT,const INT*,const COLORREF*); #define IDTRYAGAIN 10 #define IDCONTINUE 11 +/* Used for EnumDisplaySettingsEx */ +#define ENUM_CURRENT_SETTINGS ((DWORD) -1) +#define ENUM_REGISTRY_SETTINGS ((DWORD) -2) + /****** Window classes ******/ typedef struct tagCREATESTRUCTA