fix: disable gamepad handling on game start thanks to @Vector_null
All checks were successful
Code and build check / Check code (push) Successful in 1m41s
Code and build check / Build with uv (push) Successful in 49s

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-15 14:00:06 +05:00
parent f765b5e840
commit 3cc40154b0
2 changed files with 24 additions and 0 deletions

View File

@ -1726,6 +1726,8 @@ class MainWindow(QMainWindow):
elif not child_running:
# Игра завершилась сбрасываем флаг, сбрасываем кнопку и останавливаем таймер
self._gameLaunched = False
if hasattr(self, 'input_manager'):
self.input_manager.enable_gamepad_handling()
self.resetPlayButton()
#self._uninhibit_screensaver()
if hasattr(self, 'checkProcessTimer') and self.checkProcessTimer is not None:
@ -1782,6 +1784,9 @@ class MainWindow(QMainWindow):
# Если игра уже запущена для этого exe останавливаем её по нажатию кнопки
if self.game_processes and self.target_exe == current_exe:
if hasattr(self, 'input_manager'):
self.input_manager.enable_gamepad_handling()
for proc in self.game_processes:
try:
parent = psutil.Process(proc.pid)
@ -1821,6 +1826,10 @@ class MainWindow(QMainWindow):
self.target_exe = current_exe
exe_name = os.path.splitext(current_exe)[0]
env_vars = os.environ.copy()
if hasattr(self, 'input_manager'):
self.input_manager.disable_gamepad_handling()
if entry_exec_split[0] == "env" and len(entry_exec_split) > 1 and 'data/scripts/start.sh' in entry_exec_split[1]:
env_vars['START_FROM_STEAM'] = '1'
elif entry_exec_split[0] == "flatpak":