aboutsummaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authorJuan Linietsky2016-06-11 17:52:10 -0300
committerGitHub2016-06-11 17:52:10 -0300
commit3b2c96139b39ddcfbadcd21b61e5c1ff608ad95e (patch)
treeb8db32fb6e3b400420298b228d239ad5c5e8921f /platform/x11/detect.py
parentb75fb6674b844d177d6d07526dd4d05de74294f5 (diff)
parent18c941bbec51fa7e899a98eaadb883dfc4f046c0 (diff)
downloadgodot-3b2c96139b39ddcfbadcd21b61e5c1ff608ad95e.tar.gz
godot-3b2c96139b39ddcfbadcd21b61e5c1ff608ad95e.tar.zst
godot-3b2c96139b39ddcfbadcd21b61e5c1ff608ad95e.zip
Merge pull request #4905 from Hinsbart/x11_dpi
x11: Implemented dpi detection
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 0362756f7..5f272536b 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -45,6 +45,11 @@ def can_build():
print("xinerama not found.. x11 disabled.")
return False
+ x11_error=os.system("pkg-config xrandr --modversion > /dev/null ")
+ if (x11_error):
+ print("xrandr not found.. x11 disabled.")
+ return False
+
return True # X11 enabled
@@ -134,6 +139,7 @@ def configure(env):
env.ParseConfig('pkg-config x11 --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xcursor --cflags --libs')
+ env.ParseConfig('pkg-config xrandr --cflags --libs')
if (env["openssl"]=="yes"):
env.ParseConfig('pkg-config openssl --cflags --libs')
@@ -176,7 +182,7 @@ def configure(env):
print("PulseAudio development libraries not found, disabling driver")
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL'])
- env.Append(LIBS=['GL', 'GLU', 'pthread', 'z'])
+ env.Append(LIBS=['GL', 'GLU', 'pthread', 'z', 'dl'])
#env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
#host compiler is default..