Skip to content

MonoGame 3.8.1 turns off controller immediately after turning on #8082

Open
@Bikonja

Description

@Bikonja

Prerequisites

  • I have verified this issue is not present in the develop branch
  • I have searched open and closed issues to ensure it has not already been reported.

MonoGame Version

MonoGame 3.8.1.303

Which MonoGame platform are you using?

MonoGame Cross-Platform Desktop Application (mgdesktopgl)

Operating System

Windows

Description

Even in a blank MonoGame project, if a MonoGame window is running, the controller (specifically using an Xbox One controller with the wireless adapter, not sure if it makes a difference) works initially, however if the controller is turned off while the game is running, then turned on again, the controller immediately turns off.

I verified my code isn't the issue by testing against a blank MonoGame app as well as the tutorial from the MonoGame website.
I also verified that this did not occur in MonoGame 3.8.0.1641 by taking the same project, downgrading MonoGame and running the project. The same issue with the controller does not occur (but due to other incompatibilities my game does not work correctly with the older version).

A little bit of extra info, I tried debugging my app to see what the state of "GamePad.GetState" is in this scenario and, while it didn't provide me with overly useful info, I was able to observe that if I'm stopped in the debugger while connecting the controller, and then resume the app after the controller has turned on, the controller does not turn off.

I am trying to run a local build of develop branch to see if the issue is present there, but am currently unable to do so, I'll post back if I'm able to get it running.
I was able to run develop and yes, the problem is present in latest develop branch as well.

Steps to Reproduce

  1. Create an empty MonoGame Cross-Platform Desktop Application using MonoGame 3.8.1.303
  2. Run the game (either from VS or outside of VS, either debug or release, doesn't matter)
  3. Turn on controller (if not already on), specifically Xbox One controller with Wireless Adapter, though not sure if applicable to all controllers
  4. Turn off controller (hold the Big Button for ~5 seconds)
  5. Turn the controller on again (game should still be running through all these steps)

Minimal Example Repo

No response

Expected Behavior

The controller should now be on and ready to use with the game.

Resulting Behavior

The controller turns on and then immediately turns off.

Files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions