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

eframe: Add NativeOptions::persistence_path (#4423)

This allows customizing the persistence path in NativeOptions.
Previously, persistence wouldn't work with android because
directories-next doesn't support android so eframe would just fail to
find a place where it could store its config.

* Closes #4098 (android users can now specify a path that works with
android, by e.g. using app_dirs2, which supports android)
This commit is contained in:
lucasmerlin
2024-05-27 18:57:39 +02:00
committed by GitHub
parent 192a111272
commit 8553e738e0
5 changed files with 44 additions and 15 deletions

View File

@@ -41,7 +41,7 @@ impl Drop for FileStorage {
impl FileStorage {
/// Store the state in this .ron file.
fn from_ron_filepath(ron_filepath: impl Into<PathBuf>) -> Self {
pub(crate) fn from_ron_filepath(ron_filepath: impl Into<PathBuf>) -> Self {
crate::profile_function!();
let ron_filepath: PathBuf = ron_filepath.into();
log::debug!("Loading app state from {:?}…", ron_filepath);