aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-05-26 00:06:40 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-17 22:38:05 +0200
commit00d60a82e7b1b5ba62073ed891266709a59343f3 (patch)
tree674d5ef4b4311aa32f218073af5cf57e05566c3f /nx-X11/programs/Xserver/hw
parent3a7c375932d5f34be61347c58739e2e47f59aae5 (diff)
downloadnx-libs-00d60a82e7b1b5ba62073ed891266709a59343f3.tar.gz
nx-libs-00d60a82e7b1b5ba62073ed891266709a59343f3.tar.bz2
nx-libs-00d60a82e7b1b5ba62073ed891266709a59343f3.zip
Screen.c: cleanup auto dpi handling
new code is easier to read
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c15
1 files 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),