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

Allow re-render only on user intaraction #437

Merged
merged 4 commits into from
May 26, 2024
Merged

Allow re-render only on user intaraction #437

merged 4 commits into from
May 26, 2024

Conversation

not-fl3
Copy link
Owner

@not-fl3 not-fl3 commented May 26, 2024

This change introduce conf.platform.blocking_event_loop, a way to reduce CPU usage to zero when waiting for an incoming event.

When this flag is on, update/draw will only be called after an explicit window::request_update().
request_update might be called from event handler as well as from other thread.

This PR only covers wasm, linux/x11 and windows.

@not-fl3 not-fl3 merged commit cf5e4f9 into master May 26, 2024
20 checks passed
birhburh pushed a commit to birhburh/macroquad_tic_tac_toe that referenced this pull request Jun 3, 2024
But some debuging needed because it works not as expected (Because mouse or finger movements now not redraw)
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