Merge pull request #4923 from inclement/androidjoystick

Prevented attempted import of AndroidJoystick with SDL2
This commit is contained in:
dessant 2017-01-16 12:58:06 +02:00 committed by GitHub
commit 281ff677d4
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import os
from kivy.utils import platform as core_platform
from kivy.logger import Logger
from kivy.setupconfig import USE_SDL2
import kivy.input.providers.tuio
import kivy.input.providers.mouse
@ -52,7 +53,7 @@ if platform == 'linux' or 'KIVY_DOC' in os.environ:
err = 'Input: LinuxWacom is not supported by your version of linux'
Logger.exception(err)
if platform == 'android' or 'KIVY_DOC' in os.environ:
if (platform == 'android' and not USE_SDL2) or 'KIVY_DOC' in os.environ:
try:
import kivy.input.providers.androidjoystick
except: