mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-24 00:47:23 +00:00
Refactor SdlGamepadKeyNavigation to avoid multiple reinitializations of SDL
This commit is contained in:
@@ -29,17 +29,12 @@ Flickable {
|
||||
id: prefs
|
||||
}
|
||||
|
||||
SdlGamepadKeyNavigation {
|
||||
id: gamepadKeyNav
|
||||
}
|
||||
|
||||
StackView.onActivated: {
|
||||
gamepadKeyNav.setSettingsMode(true)
|
||||
gamepadKeyNav.enable()
|
||||
SdlGamepadKeyNavigation.setSettingsMode(true)
|
||||
}
|
||||
|
||||
StackView.onDeactivating: {
|
||||
gamepadKeyNav.disable()
|
||||
SdlGamepadKeyNavigation.setSettingsMode(false)
|
||||
prefs.save()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user