Updated SDK

This commit is contained in:
Observer KRypt0n_ 2023-01-28 20:02:06 +02:00
parent 12cf7b3e25
commit 14c425ae9b
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 150 additions and 24 deletions

144
Cargo.lock generated
View file

@ -73,6 +73,7 @@ dependencies = [
"anime-game-core", "anime-game-core",
"anyhow", "anyhow",
"dirs", "dirs",
"enum-ordinalize",
"lazy_static", "lazy_static",
"md5", "md5",
"serde", "serde",
@ -210,7 +211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "751f7f4e7a091545e7f6c65bacc404eaee7e87bfb1f9ece234a1caa173dc16f2" checksum = "751f7f4e7a091545e7f6c65bacc404eaee7e87bfb1f9ece234a1caa173dc16f2"
dependencies = [ dependencies = [
"cached_proc_macro_types", "cached_proc_macro_types",
"darling", "darling 0.13.4",
"quote", "quote",
"syn", "syn",
] ]
@ -399,8 +400,18 @@ version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.13.4",
"darling_macro", "darling_macro 0.13.4",
]
[[package]]
name = "darling"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa"
dependencies = [
"darling_core 0.14.2",
"darling_macro 0.14.2",
] ]
[[package]] [[package]]
@ -417,17 +428,73 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "darling_core"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn",
]
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.13.4" version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.13.4",
"quote", "quote",
"syn", "syn",
] ]
[[package]]
name = "darling_macro"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e"
dependencies = [
"darling_core 0.14.2",
"quote",
"syn",
]
[[package]]
name = "derive_builder"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8"
dependencies = [
"derive_builder_macro",
]
[[package]]
name = "derive_builder_core"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
dependencies = [
"darling 0.14.2",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "derive_builder_macro"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e"
dependencies = [
"derive_builder_core",
"syn",
]
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.6" version = "0.10.6"
@ -482,6 +549,20 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "enum-ordinalize"
version = "3.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a"
dependencies = [
"num-bigint",
"num-traits",
"proc-macro2",
"quote",
"rustc_version 0.4.0",
"syn",
]
[[package]] [[package]]
name = "field-offset" name = "field-offset"
version = "0.3.4" version = "0.3.4"
@ -489,7 +570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92"
dependencies = [ dependencies = [
"memoffset 0.6.5", "memoffset 0.6.5",
"rustc_version", "rustc_version 0.3.3",
] ]
[[package]] [[package]]
@ -1288,6 +1369,36 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "num-bigint"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-integer"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
dependencies = [
"autocfg",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "num_cpus" name = "num_cpus"
version = "1.15.0" version = "1.15.0"
@ -1633,7 +1744,16 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee"
dependencies = [ dependencies = [
"semver", "semver 0.11.0",
]
[[package]]
name = "rustc_version"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.16",
] ]
[[package]] [[package]]
@ -1728,6 +1848,12 @@ dependencies = [
"semver-parser", "semver-parser",
] ]
[[package]]
name = "semver"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
[[package]] [[package]]
name = "semver-parser" name = "semver-parser"
version = "0.10.2" version = "0.10.2"
@ -2303,11 +2429,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "wincompatlib" name = "wincompatlib"
version = "0.1.3" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97590075376c0862f23566ab10bdbb553bfd97bd86c0a20ce55bb24925273c82" checksum = "8ee6c64894fe24609e0d3b47f2715bf9f5c25a754c4a5b96599c5650266d291d"
dependencies = [ dependencies = [
"regex", "derive_builder",
] ]
[[package]] [[package]]

@ -1 +1 @@
Subproject commit c654d16e9f84cc71c00d510271d87241636cb6c2 Subproject commit 3a7486e6b725bfdb8e2c511fcbf2bc2cb7ea595d

View file

@ -34,12 +34,12 @@ impl WidgetTemplate for Enhancements {
"Futex2" "Futex2"
]), ]),
set_selected: CONFIG.game.wine.sync.into(), set_selected: CONFIG.game.wine.sync.ordinal() as u32,
connect_selected_notify => move |row| { connect_selected_notify => move |row| unsafe {
if is_ready() { if is_ready() {
if let Ok(mut config) = config::get() { if let Ok(mut config) = config::get() {
config.game.wine.sync = WineSync::try_from(row.selected()).unwrap(); config.game.wine.sync = WineSync::from_ordinal_unsafe(row.selected() as i8);
config::update(config); config::update(config);
} }
@ -66,12 +66,12 @@ impl WidgetTemplate for Enhancements {
"한국어" "한국어"
]), ]),
set_selected: CONFIG.game.wine.language.into(), set_selected: CONFIG.game.wine.language.ordinal() as u32,
connect_selected_notify => move |row| { connect_selected_notify => move |row| unsafe {
if is_ready() { if is_ready() {
if let Ok(mut config) = config::get() { if let Ok(mut config) = config::get() {
config.game.wine.language = WineLang::try_from(row.selected()).unwrap(); config.game.wine.language = WineLang::from_ordinal_unsafe(row.selected() as i8);
config::update(config); config::update(config);
} }
@ -104,12 +104,12 @@ impl WidgetTemplate for Enhancements {
#[wrap(Some)] #[wrap(Some)]
set_model = &gtk::StringList::new(&[ set_model = &gtk::StringList::new(&[
&tr("custom"),
"960x540", "960x540",
"1280x720", "1280x720",
"1920x1080", "1920x1080",
"2560x1440", "2560x1440",
"3840x2160" "3840x2160",
&tr("custom")
]), ]),
set_selected: CONFIG.game.wine.virtual_desktop.get_resolution().into(), set_selected: CONFIG.game.wine.virtual_desktop.get_resolution().into(),
@ -158,12 +158,12 @@ impl WidgetTemplate for Enhancements {
"MangoHud" "MangoHud"
]), ]),
set_selected: CONFIG.game.enhancements.hud.into(), set_selected: CONFIG.game.enhancements.hud.ordinal() as u32,
connect_selected_notify => move |row| { connect_selected_notify => move |row| unsafe {
if is_ready() { if is_ready() {
if let Ok(mut config) = config::get() { if let Ok(mut config) = config::get() {
config.game.enhancements.hud = HUD::try_from(row.selected()).unwrap(); config.game.enhancements.hud = HUD::from_ordinal_unsafe(row.selected() as i8);
config::update(config); config::update(config);
} }
@ -352,12 +352,12 @@ impl WidgetTemplate for Enhancements {
&tr("fullscreen") &tr("fullscreen")
]), ]),
set_selected: CONFIG.game.enhancements.fps_unlocker.config.window_mode.into(), set_selected: CONFIG.game.enhancements.fps_unlocker.config.window_mode.ordinal() as u32,
connect_selected_notify => move |row| { connect_selected_notify => move |row| unsafe {
if is_ready() { if is_ready() {
if let Ok(mut config) = config::get() { if let Ok(mut config) = config::get() {
config.game.enhancements.fps_unlocker.config.window_mode = WindowMode::try_from(row.selected()).unwrap(); config.game.enhancements.fps_unlocker.config.window_mode = WindowMode::from_ordinal_unsafe(row.selected() as i8);
config::update(config); config::update(config);
} }