Fix closing window does not exit app in desktop_app mode (#7628)

# Objective

- `close_when_requested` system needs to run before `exit_on_*` systems, otherwise it takes another loop to exit app.
- Fixes #7624

## Solution

- Move `close_when_request` system to Update phase [as before](https://github.com/bevyengine/bevy/issues/7624#issuecomment-1426688070).
This commit is contained in:
akimakinai 2023-02-13 19:15:24 +00:00
parent 68c94c0732
commit bf514ff12c

View file

@ -102,7 +102,8 @@ impl Plugin for WindowPlugin {
}
if self.close_when_requested {
app.add_system(close_when_requested.in_base_set(CoreSet::PostUpdate));
// Need to run before `exit_on_*` systems
app.add_system(close_when_requested);
}
// Register event types