aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winvalargs.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
commit0874ae23a16946781dd517cfdb011c691ad0b581 (patch)
tree8de31864935e96a5e59b9fe6ceb12390bbc474cd /xorg-server/hw/xwin/winvalargs.c
parentd059ebdcb012228102f0b64f8cddf9464d5b625a (diff)
downloadvcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.gz
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.bz2
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.zip
svn merge -r571:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/hw/xwin/winvalargs.c')
-rw-r--r--xorg-server/hw/xwin/winvalargs.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/xorg-server/hw/xwin/winvalargs.c b/xorg-server/hw/xwin/winvalargs.c
index 1c9b17fde..6f8d1c994 100644
--- a/xorg-server/hw/xwin/winvalargs.c
+++ b/xorg-server/hw/xwin/winvalargs.c
@@ -40,17 +40,24 @@
*/
extern int g_iNumScreens;
-extern winScreenInfo g_ScreenInfo[];
+extern winScreenInfo * g_ScreenInfo;
extern Bool g_fXdmcpEnabled;
/*
- * Prototypes
+ * Verify all screens have been explicitly specified
*/
+static BOOL
+isEveryScreenExplicit(void)
+{
+ int i;
-Bool
-winValidateArgs (void);
+ for (i = 0; i < g_iNumScreens; i++)
+ if (!g_ScreenInfo[i].fExplicitScreen)
+ return FALSE;
+ return TRUE;
+}
/*
* winValidateArgs - Look for invalid argument combinations
@@ -62,6 +69,7 @@ winValidateArgs (void)
int i;
int iMaxConsecutiveScreen = 0;
BOOL fHasNormalScreen0 = FALSE;
+ BOOL fImplicitScreenFound = FALSE;
/*
* Check for a malformed set of -screen parameters.
@@ -70,23 +78,14 @@ winValidateArgs (void)
* XWin -screen 0 -screen 2
* XWin -screen 1 -screen 2
*/
- for (i = 0; i < MAXSCREENS; i++)
- {
- if (g_ScreenInfo[i].fExplicitScreen)
- iMaxConsecutiveScreen = i + 1;
- }
- winDebug ("winValidateArgs - g_iNumScreens: %d "
- "iMaxConsecutiveScreen: %d\n",
- g_iNumScreens, iMaxConsecutiveScreen);
- if (g_iNumScreens < iMaxConsecutiveScreen)
+ if (!isEveryScreenExplicit())
{
ErrorF ("winValidateArgs - Malformed set of screen parameter(s). "
"Screens must be specified consecutively starting with "
"screen 0. That is, you cannot have only a screen 1, nor "
"could you have screen 0 and screen 2. You instead must "
- "have screen 0, or screen 0 and screen 1, respectively. Of "
- "you can specify as many screens as you want from 0 up to "
- "%d.\n", MAXSCREENS - 1);
+ "have screen 0, or screen 0 and screen 1, respectively. "
+ "You can specify as many screens as you want.\n");
return FALSE;
}