settings saving
This commit is contained in:
@@ -28,7 +28,7 @@ use crate::{
|
||||
},
|
||||
task::{OpenVrTask, OverlayTask, TaskType},
|
||||
},
|
||||
config::save_state,
|
||||
config::{save_settings, save_state},
|
||||
graphics::{GpuFutures, init_openvr_graphics},
|
||||
overlays::{
|
||||
toast::Toast,
|
||||
@@ -337,6 +337,10 @@ pub fn openvr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
|
||||
if let Err(e) = save_state(&app.session.config) {
|
||||
log::error!("Could not save state: {e:?}");
|
||||
}
|
||||
if app.session.config_dirty {
|
||||
save_settings(&app.session.config)?;
|
||||
app.session.config_dirty = false;
|
||||
}
|
||||
|
||||
log::warn!("OpenVR shutdown");
|
||||
// context.shutdown() called by Drop
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::{
|
||||
openxr::{lines::LinePool, overlay::OpenXrOverlayData},
|
||||
task::{OverlayTask, TaskType},
|
||||
},
|
||||
config::save_state,
|
||||
config::{save_settings, save_state},
|
||||
graphics::{GpuFutures, init_openxr_graphics},
|
||||
overlays::{
|
||||
toast::Toast,
|
||||
@@ -513,6 +513,10 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
|
||||
if let Err(e) = save_state(&app.session.config) {
|
||||
log::error!("Could not save state: {e:?}");
|
||||
}
|
||||
if app.session.config_dirty {
|
||||
save_settings(&app.session.config)?;
|
||||
app.session.config_dirty = false;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user