mirror of
https://github.com/gopher64/gopher64.git
synced 2026-07-11 01:25:20 +02:00
move save_settings into callback (#925)
This commit is contained in:
+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