Add SDL3-based controller input service
Integrate SDL3 controller support and wire it into the InputRouter.
- Add ControllerInputService (src/ControllerInputService.{h,cpp}) to discover, poll and translate SDL3 gamepad events into InputRouter actions, with axis repeat handling and debouncing.
- Update CMakeLists to find or fetch SDL3, add the new source files to the target, link the SDL3 target, and copy runtime DLLs on Windows.
- Add triggerAction(Action) to InputRouter and use it from existing keyboard handling to centralize action dispatch.
- Instantiate ControllerInputService in main so controllers feed the InputRouter.
- Update QML views (ShellWindow, HomeView, LibraryView, SettingsView) to use numeric action IDs and add small UI/status text and navigation tweaks for controller-driven flows.
These changes enable gamepad/controller input for Bigscreen via SDL3 and adapt UI code to handle the mapped actions.
This commit is contained in:
@@ -70,7 +70,7 @@ ApplicationWindow {
|
||||
window.handlePowerInput(action)
|
||||
return
|
||||
}
|
||||
if (action === InputRouter.Menu) {
|
||||
if (action === 7) {
|
||||
window.powerOverlayVisible = true
|
||||
return
|
||||
}
|
||||
@@ -120,16 +120,16 @@ ApplicationWindow {
|
||||
|
||||
function handlePowerInput(action) {
|
||||
switch (action) {
|
||||
case InputRouter.Up:
|
||||
case 1:
|
||||
powerOverlay.moveFocus(-1)
|
||||
break
|
||||
case InputRouter.Down:
|
||||
case 2:
|
||||
powerOverlay.moveFocus(1)
|
||||
break
|
||||
case InputRouter.Accept:
|
||||
case 5:
|
||||
powerOverlay.activateFocused()
|
||||
break
|
||||
case InputRouter.Back:
|
||||
case 6:
|
||||
window.powerOverlayVisible = false
|
||||
break
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user