add button to open save folder (#289)

This commit is contained in:
Logan McNaughton 2025-02-27 11:29:30 +01:00 committed by GitHub
parent 37b902eb31
commit eb9f37f1f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,6 +493,19 @@ impl eframe::App for GopherEguiApp {
self.netplay.create = true;
}
if ui.button("Open Saves Folder").clicked() {
let command = if cfg!(target_os = "windows") {
"explorer"
} else if cfg!(target_os = "linux") {
"xdg-open"
} else {
panic!("Unsupported platform");
};
let _ = std::process::Command::new(command)
.arg(self.dirs.data_dir.join("saves"))
.spawn();
}
ui.end_row();
if ui.button("Configure Input Profile").clicked()