浏览代码

Enable ALSA driver in non-linux X11 when available

eska 9 年之前
父节点
当前提交
56e65f9e29
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      platform/x11/detect.py

+ 5 - 1
platform/x11/detect.py

@@ -147,9 +147,13 @@ def configure(env):
 
 
 
 
 	env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
 	env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
-	if platform.system() == 'Linux':
+
+	if os.system("pkg-config --exists alsa")==0:
+		print("Enabling ALSA")
 		env.Append(CPPFLAGS=["-DALSA_ENABLED"])
 		env.Append(CPPFLAGS=["-DALSA_ENABLED"])
 		env.Append(LIBS=['asound'])
 		env.Append(LIBS=['asound'])
+	else:
+		print("ALSA libraries not found, disabling driver")
 
 
 	if (env["gamepad"]=="yes" and platform.system() == "Linux"):
 	if (env["gamepad"]=="yes" and platform.system() == "Linux"):
 		# pkg-config returns 0 when the lib exists...
 		# pkg-config returns 0 when the lib exists...