mirror of
https://github.com/gopher64/gopher64.git
synced 2026-11-11 16:49:01 +01:00
move save_settings into callback (#925)
This commit is contained in:
1 parent
c53ffebece
commit
2eb8a0dc1d
1 file changed
+8
-1
+8
-1
@@ -521,8 +521,15 @@ pub fn app_window(is_android: bool) {
|
||||
}
|
||||
ui::netplay::netplay_window(&app);
|
||||
ui::cheats::cheats_window(&app);
|
||||
|
||||
let weak_app = app.as_weak();
|
||||
app.window().on_close_requested(move || {
|
||||
weak_app
|
||||
.upgrade_in_event_loop(move |handle| save_settings(&handle))
|
||||
.unwrap();
|
||||
slint::CloseRequestResponse::HideWindow
|
||||
});
|
||||
app.run().unwrap();
|
||||
save_settings(&app);
|
||||
}
|
||||
|
||||
pub fn run_rom(
|
||||
|
||||
Reference in new issue
Block a user