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 memory leak and maintain joysticks list #8

Merged
merged 1 commit into from
Jul 12, 2020
Merged

fix memory leak and maintain joysticks list #8

merged 1 commit into from
Jul 12, 2020

Conversation

xxzl0130
Copy link
Contributor

@xxzl0130 xxzl0130 commented Jul 12, 2020

I fixed the memory leak problem, but it seems cause error for the example program.
I'm not familiar with QML, so please have a further examination.
Besides, I strongly recommend to upgrade SDL version into 2.0.10+, because Game Controller Database no longer support older version, and some problem like this issue is no longer a problem.

@alex-spataru
Copy link
Owner

Thanks!

@alex-spataru alex-spataru merged commit 4eb58ec into alex-spataru:master Jul 12, 2020
@TheodorLindberg
Copy link
Contributor

TheodorLindberg commented Sep 3, 2020

SDL_Joysticks.cpp:342 event.joystick->axes[event.button] = event.pressed;

This pull request introduces a bug where the joystick axes array is indexed with the button code, causing an index out of range crash everytime a button with a button code higer than the number of axes is pressed.

#12

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.

3 participants