From 00d60a82e7b1b5ba62073ed891266709a59343f3 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 26 May 2020 00:06:40 +0200 Subject: Screen.c: cleanup auto dpi handling new code is easier to read --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 0c1c177d6..dbe1d5d56 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1332,13 +1332,16 @@ 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)) - { - monitorResolution = NXAGENT_AUTO_DPI; + if (nxagentAutoDPI) + { + monitorResolution = NXAGENT_AUTO_DPI; + } + else + { + monitorResolution = NXAGENT_DEFAULT_DPI; + } } if (!fbScreenInit(pScreen, pFrameBufferBits, nxagentOption(RootWidth), nxagentOption(RootHeight), -- cgit v1.2.3