Commit 7cef371
committed
refactor: remove multi-controller support, keep vibration fixes
Another contributor is owning multi-controller work, so this branch
drops our per-slot routing while keeping all of the Player 1 vibration
improvements (dual-motor CombinedVibration, FileObserver rumble wake,
240ms keepalive, device-vibrator refresh, intensity/mode settings,
evshim APK-copy + defensive LD_PRELOAD).
ControllerManager.java and PhysicalControllerHandler.kt are restored
wholesale from upstream/master. WinHandler.java is edited in place to
keep the vibration pipeline intact:
- MAX_PLAYERS: 4 → 1 (per-slot arrays auto-shrink to size 1;
for-p-in-MAX_PLAYERS loops become single-iteration for slot 0)
- Dropped extraGamepadBuffers, extraControllers, and the
getBufferForSlot / getControllerForSlot / setControllerForSlot /
resolveControllerSlot helpers
- onGenericMotionEvent and onKeyEvent replaced with upstream's
single-controller adoption flow (profile.getController → fallback,
adopt only if id == "*")
- refreshControllerMappings and initializeAssignedControllers
simplified to slot 0 only
- startRumblePoller: memPaths[] array reduced to a single gamepad.mem
BionicProgramLauncherComponent.java: pre-creates only gamepad.mem and
hardcodes EVSHIM_MAX_PLAYERS="1". evshim APK-copy and LD_PRELOAD guard
preserved.
XServerScreen.kt: removed the InputManager.InputDeviceListener that
forwarded onDeviceDisconnected to PhysicalControllerHandler (method
no longer exists upstream). The onDispose cleanup for the handler and
exit-watch jobs is preserved.
Deleted tests that exercised the removed multi-slot code:
- app/src/test/java/app/gamenative/input/MultiControllerTest.kt
- app/src/test/java/com/winlator/inputcontrols/ControllerManagerTest.kt
Verification: JDK 17 compileDebugJavaWithJavac + compileDebugKotlin
clean. testDebugUnitTest shows the same 38 pre-existing failures as
baseline (PreInstallStepsTest, SteamUtilsFileSearchTest, etc.) — zero
new regressions. Debug APK built and installed on device; full
controller input + vibration chain traced end-to-end.1 parent 501eaa7 commit 7cef371
7 files changed
Lines changed: 215 additions & 902 deletions
File tree
- app/src
- main/java
- app/gamenative/ui/screen/xserver
- com/winlator
- inputcontrols
- winhandler
- xenvironment/components
- test/java
- app/gamenative/input
- com/winlator/inputcontrols
Lines changed: 85 additions & 174 deletions
Large diffs are not rendered by default.
Lines changed: 0 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | 411 | | |
425 | | - | |
426 | 412 | | |
427 | 413 | | |
428 | 414 | | |
| |||
0 commit comments