mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Add an option to limit the repaint rate in the web runner (#7482)
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9db03983dd
commit
ec5bc35c38
@@ -96,7 +96,8 @@ impl AppRunner {
|
||||
wgpu_render_state: None,
|
||||
};
|
||||
|
||||
let needs_repaint: std::sync::Arc<NeedRepaint> = Default::default();
|
||||
let needs_repaint: std::sync::Arc<NeedRepaint> =
|
||||
std::sync::Arc::new(NeedRepaint::new(web_options.max_fps));
|
||||
{
|
||||
let needs_repaint = needs_repaint.clone();
|
||||
egui_ctx.set_request_repaint_callback(move |info| {
|
||||
|
||||
Reference in New Issue
Block a user