How subhashish-mishra/gamypad works
Gamypad pairs an Android touch controller with a Linux UDP server. The user starts the PC server, scans its QR code or enters its address, connects, and opens the controller; input is streamed over WiFi and exposed to Linux games as an Xbox 360-style device through uinput. The Android app also supports editable layouts, stick deadzone tuning, haptics, digital triggers, and connection monitoring. The graph retains these documented capabilities, but Dart networking and UI call paths were not sampled, so some internal links are dashed and unverified.
Main entry points: view/home_view.dart Pairing home · view/home_view.dart Server controls · udp_socket.dart UDP server · controller_view.dart Controller view
Components 27
Android experience
- Android app
gamypad_controller/lib/app.dart - Pairing home
gamypad_controller/lib/src/ui/view/home_view.dart - QR scanning
gamypad_controller/lib/src/ui/view/qr_scan_view.dart - Controller view
gamypad_controller/lib/src/ui/view/controller_view.dart - Pad rendering
gamypad_controller/lib/src/ui/widgets/pad/pad_renderer.dart - Layout editor
gamypad_controller/lib/src/ui/view/controller_editor_view.dart
Android runtime
- Layout management
gamypad_controller/lib/src/ui/state/layout_controller.dart - Layout storage
gamypad_controller/lib/src/layout/layout_repository.dart - Settings
gamypad_controller/lib/src/settings/setting_repository.dart - Input shaping
gamypad_controller/lib/src/input/gamepad_input.dart - Connection state
gamypad_controller/lib/src/ui/state/connection_controller.dart - UDP transport
gamypad_controller/lib/src/connection/udp_transport.dart - Connection target
gamypad_controller/lib/src/connection/connection_target.dart
Linux runtime
- Linux app
gamypad_pc/lib/app.dart - Server controls
gamypad_pc/lib/src/ui/view/home_view.dart - UDP server
gamypad_pc/lib/src/transport/udp_socket.dart - Gamepad session
gamypad_pc/lib/src/session/gamepad_session.dart - Device interface
gamypad_pc/lib/src/device/gamepad_device.dart - Native bridge
gamypad_pc/lib/src/device/gamepad_ffi.dart - uinput device
gamypad_pc/native/Gamepad.cpp - Native gamepad API
gamypad_pc/native/GamepadApi.cpp - Gamepad interface
gamypad_pc/native/Gamepad.h - Linux desktop host
gamypad_pc/linux/runner/my_application.cc
Shared protocol
- Message protocol
protocol/lib/src/messages.dart
Other components
- Player
- Local WiFi
- Linux games
Connections 29
- Player → Pairing home: pairs from
README.md - Player → Server controls: starts server
README.md - Server controls → UDP server: starts server
- Server controls → Connection target: shows QR address
README.md - Pairing home → QR scanning: opens scanner
README.md - QR scanning → Connection target: fills address
README.md - Player → Controller view: opens controller
README.md - Controller view → Pad rendering: renders controls
- Player → Layout editor: edits layout
README.md - Layout editor → Layout management: configures layout
- Layout management → Layout storage: persists layout
- Player → Settings: tunes options
README.md - Controller view → Input shaping: streams input
- Pairing home → Connection state: connects
- Connection state → UDP transport: sends input
- UDP transport → Local WiFi: sends UDP
README.md - Local WiFi → UDP server: delivers UDP
README.md - UDP server → Gamepad session: dispatches input
- Gamepad session → Device interface: updates device
- Device interface → Native bridge: calls native API
- Native bridge → Native gamepad API: invokes functions
- Native gamepad API → Gamepad interface: uses interface
gamypad_pc/native/GamepadApi.cpp - Native gamepad API → uinput device: creates and updates
gamypad_pc/native/GamepadApi.cpp - uinput device → Linux games: emulates controller
README.md - UDP transport → Message protocol: encodes messages
- UDP server → Message protocol: decodes messages
- Android app → Pairing home: hosts
- Linux app → Server controls: hosts
- Linux desktop host → Linux app: hosts Flutter app
gamypad_pc/linux/runner/my_application.cc