Don't poll gamepad input when the GUI is not focused/visible

This commit is contained in:
Cameron Gutman
2024-09-26 19:24:29 -05:00
parent 9b3d4c1ad7
commit 2a63ad53d7
5 changed files with 43 additions and 21 deletions
-5
View File
@@ -2,7 +2,6 @@ import QtQuick 2.0
import QtQuick.Controls 2.2
import ComputerManager 1.0
import SdlGamepadKeyNavigation 1.0
Item {
function onSearchingComputer() {
@@ -38,10 +37,6 @@ Item {
if (!launcher.isExecuted()) {
toolBar.visible = false
// Normally this is enabled by PcView, but we will won't
// load PcView when streaming from the command-line.
SdlGamepadKeyNavigation.enable()
launcher.searchingComputer.connect(onSearchingComputer)
launcher.searchingApp.connect(onSearchingApp)
launcher.sessionCreated.connect(onSessionCreated)