1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

eframe: Use NativeOptions::AppId for the persistance location (#3014)

* eframe: Use NativeOptions::AppId for the persistance location

* Fix doclinks

* Fix typo in docs

Closes https://github.com/emilk/egui/issues/3003
This commit is contained in:
Emil Ernerfeldt
2023-05-23 08:38:14 +02:00
committed by GitHub
parent 9d5b324787
commit 03bb89153b
5 changed files with 32 additions and 14 deletions

View File

@@ -682,7 +682,12 @@ mod glow_integration {
}
fn init_run_state(&mut self, event_loop: &EventLoopWindowTarget<UserEvent>) -> Result<()> {
let storage = epi_integration::create_storage(&self.app_name);
let storage = epi_integration::create_storage(
self.native_options
.app_id
.as_ref()
.unwrap_or(&self.app_name),
);
let (gl_window, gl) = Self::create_glutin_windowed_context(
event_loop,
@@ -1350,7 +1355,12 @@ mod wgpu_integration {
self.set_window(window)?;
}
} else {
let storage = epi_integration::create_storage(&self.app_name);
let storage = epi_integration::create_storage(
self.native_options
.app_id
.as_ref()
.unwrap_or(&self.app_name),
);
let window = Self::create_window(
event_loop,
storage.as_deref(),