Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackendPlatformUserData not getting updated after start #720

Open
Malkierian opened this issue Nov 12, 2024 · 2 comments
Open

BackendPlatformUserData not getting updated after start #720

Malkierian opened this issue Nov 12, 2024 · 2 comments

Comments

@Malkierian
Copy link
Contributor

It seems to hold onto the status of the connected gamepads, specifically from startup. If you connect a controller and then run 2ship, for instance, on line 774 of imgui_impl_sdl2.cpp shows bd->Gamepads.Size of 1. If you then disconnect that controller, bg->Gamepads.Size remains at a size of 1 until closing. If, however, you start 2ship without any controllers connected, that same line shows a size of 0, and that will remain 0 no matter how many controllers you then connect.

This then presents a problem with menu navigation. In the first scenario, all controller menu functionality is working, and continues to work across disconnects. In the second scenario, though, the menu never responds. The controller must be connected on startup for ImGui to update the ImGui key structures going forward for that session.

@Malkierian
Copy link
Contributor Author

To be clear, I have no idea if this is our fault or ImGui's.

@Malkierian
Copy link
Contributor Author

This behavior also is only applicable to OpenGL and the SDL backend. DirectX's backend has no issues with this, however non-XInput controllers seem unresponsive entirely on DirectX backend with the new menu, and the other fixes don't seem to make a difference. Will continue to document and check back later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant