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

SDL 2.0.16 brings optimization to SDL_WaitEvent #43

Closed
mwcampbell opened this issue Feb 26, 2022 · 3 comments
Closed

SDL 2.0.16 brings optimization to SDL_WaitEvent #43

mwcampbell opened this issue Feb 26, 2022 · 3 comments

Comments

@mwcampbell
Copy link

SDL version 2.0.16 includes this commit which enables SDL_WaitEvent to actually wait for an OS event instead of polling. In addition to potentially being more power-efficient, this improvement will help with my plan to implement screen reader accessibility for Ren'Py (not quite the same as self-voicing), particularly on Windows, Mac, and iOS. The problem is that on these platforms, the accessibility API requires IPC to the thread that owns the native window, which has to go through the OS event pumping mechanism, and a single screen reader command can require several IPC round trips, so a 1ms+ delay per round trip (which is what SDL_WaitEvent previously did) is noticeable. But at the same time, polling with no delay is obviously a non-starter. So updating to a version of SDL that includes this optimization would be helpful.

@renpytom
Copy link
Member

Seems good to me, I'll try this upgrade this weekend.

Is the screenreader accessibility similar to the self-voicing, or do you plan to add other APIs for it?

@mwcampbell
Copy link
Author

I decided to move discussion of screen reader accessibility to a new issue: renpy/renpy#3306

@renpytom
Copy link
Member

renpytom commented Apr 9, 2022

We've upgraded SDL2.

@renpytom renpytom closed this as completed Apr 9, 2022
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

No branches or pull requests

2 participants