-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
win stop responding when there is no tcod.event.get()
#114
Comments
This is normal behavior for SDL-based programs. Event polling is how your program tells Windows that your app isn't hanging. SDL has SDL_PumpEvents which lets you keep the window awake without needing to handle the events immediately. You can call this function from tcod using |
There isn't much more to add. A program does need to check events at least to respond to quit events and other windowing events. A main loop without event polling might be considered invalid. Something like a long loading screen might use |
Hi, HexDec |
No problem. Keeping the event loop from the getting started examples should be enough. You only need to replace |
Hi, HexDec!
I find that the window will stop responding if no
tcod.event.get()
is called in the main loop, on Win10 and python3.7. I'm new to python-tcod, so I do not actually know what happened in sdl event functions or whether it is expected.It might be better to add a comment on
getting started
or add protect on related functions.The text was updated successfully, but these errors were encountered: