| Summary: | SDL_WaitEventTimeout function | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Pierre Phaneuf <pphaneuf> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | API change | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Mac OS X 10.5 (Intel) | ||
| Attachments: | adds SDL_WaitEventTimeout function | ||
Thanks! I reworked this a little bit and committed it as revision 4438. |
Created attachment 292 [details] adds SDL_WaitEventTimeout function Here's a patch to add an SDL_WaitEventTimeout method to SDL 1.3 (as of r4406) without changing anything underneath. It is careful to avoid calling SDL_GetTicks() if either a zero or an infinite timeout have been requested. Also, it reimplement SDL_PollEvent and SDL_WaitEvent in terms of this more generic function. It would be better if they were inlined in the header, but I wasn't sure of the policy for that, since strange compilers might be involved (I'm usually more of a C++ hacker).