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

Fix controller issues #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

LoveMHz
Copy link
Contributor

@LoveMHz LoveMHz commented Dec 30, 2020

This is an attempt to fix the issue and workaround described in issue #6.

While this isn't a fix for the possible upstream bug, I do believe it's a suitable workaround and should serve the usage of the app even after the issue is resolved.


// Update controllers roughly every second
if(frame_counter % 60 == 0) {
update_controllers();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm certified stupid, but wouldn't this attempt to open the same gamecontroller(s) once every second?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This should allow controllers to be plugged in after the app is loaded. Looks to me to be pretty safe to call this often. https://github.com/XboxDev/nxdk-sdl/blob/a2a2d9ca1a5a7082c830490a0b110829939de3a7/src/joystick/SDL_gamecontroller.c#L1548

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

Successfully merging this pull request may close these issues.

2 participants