Add checks to rename configs if required

This commit is contained in:
Luke D. Jones
2023-01-08 22:00:32 +13:00
parent ab3007d53d
commit 9cc62d63c9
7 changed files with 125 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
use config_traits::{StdConfig, StdConfigLoad3};
use serde_derive::{Deserialize, Serialize};
const CONFIG_FILE: &str = "asusd.conf";
const CONFIG_FILE: &str = "asusd.ron";
#[derive(Deserialize, Serialize, Default)]
pub struct Config {

View File

@@ -5,7 +5,7 @@ use rog_anime::error::AnimeError;
use rog_anime::{ActionData, ActionLoader, AnimTime, AnimeType, Fade, Vec2};
use serde_derive::{Deserialize, Serialize};
const CONFIG_FILE: &str = "anime.conf";
const CONFIG_FILE: &str = "anime.ron";
#[derive(Deserialize, Serialize)]
pub struct AnimeConfigV341 {

View File

@@ -8,7 +8,7 @@ use rog_platform::hid_raw::HidRaw;
use rog_platform::keyboard_led::KeyboardLed;
use serde_derive::{Deserialize, Serialize};
const CONFIG_FILE: &str = "aura.conf";
const CONFIG_FILE: &str = "aura.ron";
/// Enable/disable LED control in various states such as
/// when the device is awake, suspended, shutting down or

View File

@@ -7,8 +7,8 @@ use serde_derive::{Deserialize, Serialize};
use crate::CONFIG_PATH_BASE;
const CONFIG_FILE: &str = "profile.conf";
const CONFIG_FAN_FILE: &str = "fan_curves.conf";
const CONFIG_FILE: &str = "profile.ron";
const CONFIG_FAN_FILE: &str = "fan_curves.ron";
#[derive(Deserialize, Serialize, Debug)]
pub struct ProfileConfig {