Commit 00d60a82 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Screen.c: cleanup auto dpi handling

new code is easier to read
parent 3a7c3759
......@@ -1332,14 +1332,17 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
rootDepth, (long unsigned int)defaultVisual);
#endif
if ((monitorResolution < 1) && (nxagentAutoDPI == False))
if (monitorResolution < 1)
{
monitorResolution = NXAGENT_DEFAULT_DPI;
}
else if ((monitorResolution < 1) && (nxagentAutoDPI == True))
if (nxagentAutoDPI)
{
monitorResolution = NXAGENT_AUTO_DPI;
}
else
{
monitorResolution = NXAGENT_DEFAULT_DPI;
}
}
if (!fbScreenInit(pScreen, pFrameBufferBits, nxagentOption(RootWidth), nxagentOption(RootHeight),
monitorResolution, monitorResolution, PixmapBytePad(nxagentOption(RootWidth), rootDepth), bitsPerPixel))
......
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