mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
correctly end stderr + stdout capturing processes on force-stopping game
- this bug led to increasing cpu usage when killing running game process via "stop" red button in the editor
This commit is contained in:
+5
-1
@@ -1730,7 +1730,11 @@ impl Editor {
|
||||
|
||||
fn set_editor_mode(&mut self) {
|
||||
match std::mem::replace(&mut self.mode, Mode::Edit) {
|
||||
Mode::Play { mut process, .. } => {
|
||||
Mode::Play {
|
||||
mut process,
|
||||
active,
|
||||
} => {
|
||||
active.store(false, Ordering::SeqCst);
|
||||
Log::verify(process.kill());
|
||||
self.on_mode_changed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user