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

Gamepad fixes and error handling #505

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

Conversation

kg
Copy link
Contributor

@kg kg commented Dec 8, 2024

No description provided.

Copy link
Member

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

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

One note applied to various places in the fix

@@ -2017,9 +2017,19 @@ private static void INTERNAL_AddInstance(uint dev)

// Open the device!
INTERNAL_devices[which] = SDL.SDL_OpenGamepad(dev);
string error = SDL.SDL_GetError();
if (!string.IsNullOrEmpty(error)) {
Copy link
Member

Choose a reason for hiding this comment

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

Similar to the other checks we should use tue return value of the function instead of the error buffer

@flibitijibibo
Copy link
Member

Fast-tracked the fixes, so it's just the error logging that's left: 6415dfd

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