Skip to content

Commit

Permalink
Window recreation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockOG committed Jun 20, 2023
1 parent 5ff0fb7 commit 19988a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ pub fn draw() {
get_egui().draw()
}

// Intended to be used only if you recreate the window, making the old EGUI instance invalid.
#[doc(hidden)]
pub fn reset_egui() {
unsafe {
EGUI = None;
}
}

impl mq::EventHandler for Egui {
fn update(&mut self, _ctx: &mut mq::Context) {}

Expand Down

0 comments on commit 19988a5

Please sign in to comment.