use statically linked interception library for directinput emulation

This commit is contained in:
4yn
2022-07-24 15:55:57 +08:00
parent 0e75256520
commit 571eec24d3
20 changed files with 1948 additions and 31 deletions

15
src-tauri/Cargo.lock generated
View File

@@ -1497,6 +1497,20 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "interception"
version = "0.1.2"
dependencies = [
"bitflags",
"interception-sys",
"num_enum",
"serde",
]
[[package]]
name = "interception-sys"
version = "0.1.3"
[[package]]
name = "ipconfig"
version = "0.3.0"
@@ -2954,6 +2968,7 @@ dependencies = [
"futures-util",
"hyper",
"image 0.23.14",
"interception",
"ipconfig",
"log",
"palette",

View File

@@ -38,6 +38,7 @@ fn main() {
env_logger::Builder::new()
.filter_level(log::LevelFilter::Debug)
.init();
info!("Starting slidershim");
#[cfg(not(debug_assertions))]
{
@@ -45,7 +46,9 @@ fn main() {
simple_logging::log_to_file(log_file_path.as_path(), log::LevelFilter::Debug).unwrap();
}
info!("Loading config");
let config = Arc::new(Mutex::new(Some(slider_io::Config::load())));
info!("Loading manager");
let manager = Arc::new(Mutex::new(slider_io::Manager::new()));
{
let config_handle = config.lock();
@@ -55,6 +58,7 @@ fn main() {
manager_handle.update_config(config_handle_ref.clone());
}
info!("Running tauri");
tauri::Builder::default()
.system_tray(
// System tray content