feat(genshin): removed use of Fps
enum for unlocker options
This commit is contained in:
parent
7ed5457174
commit
4e835d8e33
3 changed files with 4 additions and 6 deletions
|
@ -5,7 +5,7 @@ use crate::config::schema_blanks::prelude::*;
|
|||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct Config {
|
||||
pub fps: Fps,
|
||||
pub fps: u64, // TODO: Fps enum
|
||||
pub power_saving: bool,
|
||||
pub monitor: u64,
|
||||
pub window_mode: WindowMode,
|
||||
|
@ -16,7 +16,7 @@ impl Default for Config {
|
|||
#[inline]
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
fps: Fps::HundredTwenty,
|
||||
fps: 120,
|
||||
power_saving: false,
|
||||
monitor: 1,
|
||||
window_mode: WindowMode::default(),
|
||||
|
@ -31,7 +31,7 @@ impl From<&JsonValue> for Config {
|
|||
|
||||
Self {
|
||||
fps: match value.get("fps") {
|
||||
Some(value) => value.as_u64().map(Fps::from_num).unwrap_or(default.fps),
|
||||
Some(value) => value.as_u64().unwrap_or(default.fps),
|
||||
None => default.fps
|
||||
},
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ pub struct Game {
|
|||
impl Default for Game {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
|
||||
|
||||
Self {
|
||||
path: Paths::default(),
|
||||
voices: vec![
|
||||
|
|
|
@ -52,7 +52,7 @@ impl Default for ConfigSchema {
|
|||
impl ConfigSchema {
|
||||
pub fn from_config(config: FpsUnlockerConfig) -> Self {
|
||||
Self {
|
||||
FPSTarget: config.fps.to_num(),
|
||||
FPSTarget: config.fps,
|
||||
UsePowerSave: config.power_saving,
|
||||
PopupWindow: config.window_mode == WindowMode::Popup,
|
||||
Fullscreen: config.window_mode == WindowMode::Fullscreen,
|
||||
|
|
Loading…
Reference in a new issue