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
Added functions for distinguishing gamepad button presses, also fix gamepad data persisting #2571
Conversation
Some builds failed... Looks like I need to add my new functions to a header file I'm guessing? I can't seem to find where the other functions on |
emerging from the trees and brush, covered in dirt and wounds while hyperventilating Okay! So it turns out you don't just simply add functions to io and api! I was confused why some platforms weren't building properly and noticed the only place where Anyways, here's |
I have serious doubts that we should bloat the API for these functions when user can always read the current state of the gamepad buttons using |
It's ultimately up to you. I personally feel like the If you read issue 2561 you'll find I originally made these functions to solve a bug where users who crash their game from pressing button 6 get warped to Surf. It was my changes to |
@nesbox I tested my hypothesis from earlier now that I'm back home. The changes to I don't know if you plan on asking for more opinions on |
@LettucePie thank you for your help, I merged the pull request regarding the bug in the core, but as for the new API, I suggest closing this part, sorry. |
Hello again!
This fixes issue 2561 (#2561) which is an issue I inadvertently created, familiar territory for most of us here I'm sure lol.
I am still not very experienced with C and memory management, and while fixing this I found some security messages and other questions within
core.c
. While it seems like I didn't violate any security issues, it might be best if someone who understands this better checks in. I separated my changes tocore.c
in two commits. My attempt to solve 2561 requires those changes.817e09c3299306c9ce88ac7fa6ad1607dfe0367f
before touching core.cc3328075aa3d2bd1697f362a7cc340f473d4615f
afterTo easily test the issue, I made a new lua cart called "breaktest"