Skip to content

wait rather than check for CPU goodness #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swelljoe
Copy link

This changes sys_check_for_event to sys_wait_for_event, which makes it blocking rather than having the while loop handle the waiting. On my Linux system, using check leads to bogus keypresses being registered (moves two spaces in some circumstances), and 100% CPU usage at all times. As far as I can tell, it works fine with this change, including mouse functionality.

Also, thanks for making the Python 3 version of the tutorial! It's been fun to tinker with.

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

Successfully merging this pull request may close these issues.

1 participant