backend: forward keyboard and mouse input from client

This commit is contained in:
2025-08-10 01:23:41 -06:00
parent d4777fcf08
commit 9afd4e63c4
10 changed files with 1399 additions and 11 deletions
+8 -4
View File
@@ -12,9 +12,13 @@ struct CustomCallbacks;
impl ParseCallbacks for CustomCallbacks {
fn int_macro(&self, name: &str, _value: i64) -> Option<IntKind> {
match name {
"STREAM_CFG_LOCAL" => Some(IntKind::I32),
"STREAM_CFG_REMOTE" => Some(IntKind::I32),
"STREAM_CFG_AUTO" => Some(IntKind::I32),
//"STREAM_CFG_LOCAL" => Some(IntKind::I32),
//"STREAM_CFG_REMOTE" => Some(IntKind::I32),
//"STREAM_CFG_AUTO" => Some(IntKind::I32),
"KEY_ACTION_DOWN" => Some(IntKind::I8),
"KEY_ACTION_UP" => Some(IntKind::I8),
"BUTTON_ACTION_PRESS" => Some(IntKind::I8),
"BUTTON_ACTION_RELEASE" => Some(IntKind::I8),
_ => None, // Default behavior for all others
}
}
@@ -34,7 +38,7 @@ fn main() {
let bindings = bindgen::Builder::default()
.header("moonlight-common-c/src/Limelight.h")
.clang_arg(format!("-I{}/src", dst.display())) // Include built headers
//.parse_callbacks(Box::new(CustomCallbacks))
.parse_callbacks(Box::new(CustomCallbacks))
.default_macro_constant_type(bindgen::MacroTypeVariation::Signed)
.generate()
.expect("Failed to generate bindings");