| Summary: | Add TimerID as parameter to SDL_TimerCallback(...) callback function | ||
|---|---|---|---|
| Product: | SDL | Reporter: | george.oros |
| Component: | timer | Assignee: | Sam Lantinga <slouken> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | linus.probert |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Solves the issue. But there might be stuff I'm not seeing | ||
|
Description
george.oros
2017-09-06 13:29:06 UTC
I agree, added for consideration for SDL 2.1. I was having a look at the SDL code and made a quick implementation of this issue just to get some practice navigating the code and... well I like to code. :D Anywho, is this issue still relevant? Would you like to see my patch or is there already a solution in the pipe? I haven't spent much time browsing through the documentation and stuff, but if you want my patch but want me to read through some code of conduct or format guides or whatever then please point me in the right direction. Br, Linus @linus.probert@gmail.com Sure I would like to see the patch/fix. Created attachment 3376 [details]
Solves the issue. But there might be stuff I'm not seeing
Attaching a patch. Perhaps (likely) there is a ton of things that I should have thought of but didn't. Just get back to me with all of it and I will try to adapt.
I use SDL _alot_ so it would be wonderful to get into the source of it a bit more.
I haven't tested with this patch, but the fix should solve this bug. Thank you! It worked in the testbed I set up at least. My concern is how "true" you decide to be to backwards compatibility. It will require code changes for those who decide to upgrade. But perhaps that is acceptable for a minor version upgrade? I reported this "bug" (more of a missing feature) as I needed this fix. Of course it will break backward compatibility but this is something you have to decide if it is acceptable in the given context. I assume nobody else complained about this point until now and the code is pretty old; on the other hand the fix is trivial. This is a good idea, and we should probably accept this patch for SDL 2.1, where we can change the ABI. |