Commit ad0864d4 authored by Egbert Eich's avatar Egbert Eich

Make bool option parsing clearer and more consistent

When there's no need to know whether the user has set the value
of a configurable option (for logging for instance) the return
of xf86ReturnOptValBool() can be assigned directly.
Signed-off-by: default avatarEgbert Eich <eich@freedesktop.org>
Reviewed-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 29a14954
......@@ -838,16 +838,15 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options);
/* Use shadow by default */
if (xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB, TRUE))
pVesa->shadowFB = TRUE;
pVesa->shadowFB = xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB,
TRUE);
if (xf86ReturnOptValBool(pVesa->Options, OPTION_DFLT_REFRESH, FALSE))
pVesa->defaultRefresh = TRUE;
pVesa->ModeSetClearScreen = FALSE;
if (xf86ReturnOptValBool(pVesa->Options, OPTION_MODESET_CLEAR_SCREEN,
FALSE))
pVesa->ModeSetClearScreen = TRUE;
pVesa->ModeSetClearScreen =
xf86ReturnOptValBool(pVesa->Options,
OPTION_MODESET_CLEAR_SCREEN, FALSE);
if (!pVesa->defaultRefresh && !pVesa->strict_validation)
VBESetModeParameters(pScrn, pVesa->pVbe);
......
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