1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Make Context::request_repaint safe to call from any thread.

Closes https://github.com/emilk/egui/issues/1379
This commit is contained in:
Emil Ernerfeldt
2022-03-20 20:53:19 +01:00
parent ccbddcfe95
commit 72d264ed6c
5 changed files with 65 additions and 50 deletions

View File

@@ -229,12 +229,11 @@ pub struct EpiIntegration {
impl EpiIntegration {
pub fn new(
integration_name: &'static str,
egui_ctx: egui::Context,
max_texture_side: usize,
window: &winit::window::Window,
persistence: crate::epi::Persistence,
) -> Self {
let egui_ctx = egui::Context::default();
*egui_ctx.memory() = persistence.load_memory().unwrap_or_default();
let prefer_dark_mode = prefer_dark_mode();