mirror of
https://github.com/mbilker/vgpu_unlock-rs.git
synced 2026-01-17 20:07:00 +01:00
config: add global config with toggle to disable unlock for official vgpu cards
This commit is contained in:
25
src/config.rs
Normal file
25
src/config.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use serde::Deserialize;
|
||||
|
||||
struct Defaults;
|
||||
|
||||
impl Defaults {
|
||||
#[inline]
|
||||
const fn unlock() -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Config {
|
||||
#[serde(default = "Defaults::unlock")]
|
||||
pub unlock: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
unlock: Defaults::unlock(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user