forked from Boria138/PortProtonQt
fix(input_manager): prevent gamepad input handling during game execution
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
parent
a3d7351e16
commit
aabf8cb30f
@ -357,6 +357,8 @@ class InputManager(QObject):
|
|||||||
@Slot(int)
|
@Slot(int)
|
||||||
def handle_button_slot(self, button_code: int) -> None:
|
def handle_button_slot(self, button_code: int) -> None:
|
||||||
try:
|
try:
|
||||||
|
if getattr(self._parent, '_gameLaunched', False):
|
||||||
|
return
|
||||||
app = QApplication.instance()
|
app = QApplication.instance()
|
||||||
if not app:
|
if not app:
|
||||||
return
|
return
|
||||||
@ -407,6 +409,8 @@ class InputManager(QObject):
|
|||||||
@Slot(int, int, float)
|
@Slot(int, int, float)
|
||||||
def handle_dpad_slot(self, code: int, value: int, current_time: float) -> None:
|
def handle_dpad_slot(self, code: int, value: int, current_time: float) -> None:
|
||||||
try:
|
try:
|
||||||
|
if getattr(self._parent, '_gameLaunched', False):
|
||||||
|
return
|
||||||
app = QApplication.instance()
|
app = QApplication.instance()
|
||||||
if not app:
|
if not app:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user