mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-14 21:32:27 +00:00
Initialize gamepad navigation when streaming from the terminal
This commit is contained in:
parent
1bc3675548
commit
81019fa2a8
2 changed files with 9 additions and 0 deletions
|
@ -2,6 +2,7 @@ import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
|
|
||||||
import ComputerManager 1.0
|
import ComputerManager 1.0
|
||||||
|
import SdlGamepadKeyNavigation 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
function onSearchingComputer() {
|
function onSearchingComputer() {
|
||||||
|
@ -35,6 +36,11 @@ Item {
|
||||||
StackView.onActivated: {
|
StackView.onActivated: {
|
||||||
if (!launcher.isExecuted()) {
|
if (!launcher.isExecuted()) {
|
||||||
toolBar.visible = false
|
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.searchingComputer.connect(onSearchingComputer)
|
||||||
launcher.searchingApp.connect(onSearchingApp)
|
launcher.searchingApp.connect(onSearchingApp)
|
||||||
launcher.sessionCreated.connect(onSessionCreated)
|
launcher.sessionCreated.connect(onSessionCreated)
|
||||||
|
|
|
@ -26,6 +26,9 @@ CenteredGridView {
|
||||||
currentIndex = -1
|
currentIndex = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: Any initialization done here that is critical for streaming must
|
||||||
|
// also be done in CliStartStreamSegue.qml, since this code does not run
|
||||||
|
// for command-line initiated streams.
|
||||||
StackView.onActivated: {
|
StackView.onActivated: {
|
||||||
// Setup signals on CM
|
// Setup signals on CM
|
||||||
ComputerManager.computerAddCompleted.connect(addComplete)
|
ComputerManager.computerAddCompleted.connect(addComplete)
|
||||||
|
|
Loading…
Reference in a new issue