如果在 Kivy 中反转触摸输入怎么办 [英] How do if invert touch input in Kivy

查看:18
本文介绍了如果在 Kivy 中反转触摸输入怎么办的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Raspberry Pi SPI 显示器上运行带有 pygame 后端的 Kivy.一切正常,除了触摸输入的 y 轴被反转.我该如何更改?

I'm running Kivy with the pygame backend on a Raspberry Pi SPI display. Everything works, except the y-axis of the touch input is inverted. How can I change this?

推荐答案

我设法解决了以下问题:

I managed to solve the problem as follows:

sudo nano/usr/local/lib/python2.7/dist-packages/kivy/input/providers/hidinput.py

sudo nano /usr/local/lib/python2.7/dist-packages/kivy/input/providers/hidinput.py

第 417 行

invert_y = int(bool(drs('invert_y', 1)))

为了

invert_y = int(bool(drs('invert_y', 0)))

这篇关于如果在 Kivy 中反转触摸输入怎么办的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆