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:
Dmitry Stepanov
2026-04-20 00:06:37 +03:00
parent 9b2156e3c5
commit fe51f6b463
+5 -1
View File
@@ -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();
}