Reading and writing settings through UI

This commit is contained in:
Philip Kristoffersen
2021-10-02 13:45:52 +02:00
parent da4531ecaf
commit 088016843d
14 changed files with 195 additions and 82 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ fn dbpath_to_game(paths: &DbPaths<'_>) -> Option<ItchGame> {
}
#[cfg(target_os = "linux")]
fn get_default_location() -> String {
pub fn get_default_location() -> String {
//If we don't have a home drive we have to just die
let home = std::env::var("HOME").expect("Expected a home variable to be defined");
format!("{}/.config/itch/", home)
+2 -2
View File
@@ -1,6 +1,6 @@
use serde::Deserialize;
use serde::{Serialize,Deserialize};
#[derive(Debug, Deserialize, Clone)]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct ItchSettings {
pub enabled: bool,
pub location: Option<String>,