Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #1280

Closed
Open
Created Oct 14, 2018 by Alex Gleason@alexgleasonContributor

Feature request: get info about connected gamepads

LOVE has a really nice joystick API where you can getJoysticks() to return a table of the connected joystick objects.

You can then use joystick:getName() and it will return a value like XBox 360 Controller or 8Bitdo SN30 Pro.

I think this would be useful for:

  1. Giving feedback to the player about what devices the game is seeing and utilizing.
  2. We can use the gamepad name to automatically configure bindings. For example, the Xbox 360 controller is very common, so our game script can detect it (if joystick:get_name() == "Xbox 360 Controller") and automatically bind button 0 to "action", button 2 to "attack", etc.

(It's possible I'm undersimplifying USB gamepads, but this is my theory)

Edited Oct 14, 2018 by Alex Gleason
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking