forked from mirror/Archipelago
Launcher: Add workaround for kivy bug for linux touchpad devices (#5737)
* add code to fix touchpad on linux, courtesy of Snu of the kivy community * Launcher: Update workaround to follow styleguide
This commit is contained in:
11
kvui.py
11
kvui.py
@@ -35,6 +35,17 @@ Config.set("input", "mouse", "mouse,disable_multitouch")
|
||||
Config.set("kivy", "exit_on_escape", "0")
|
||||
Config.set("graphics", "multisamples", "0") # multisamples crash old intel drivers
|
||||
|
||||
# Workaround for Kivy issue #9226.
|
||||
# caused by kivy by default using probesysfs,
|
||||
# which assumes all multi touch deviecs are touch screens.
|
||||
# workaround provided by Snu of the kivy commmunity c:
|
||||
from kivy.utils import platform
|
||||
if platform == "linux":
|
||||
options = Config.options("input")
|
||||
for option in options:
|
||||
if Config.get("input", option) == "probesysfs":
|
||||
Config.remove_option("input", option)
|
||||
|
||||
# Workaround for an issue where importing kivy.core.window before loading sounds
|
||||
# will hang the whole application on Linux once the first sound is loaded.
|
||||
# kivymd imports kivy.core.window, so we have to do this before the first kivymd import.
|
||||
|
||||
Reference in New Issue
Block a user