backend: forward keyboard and mouse input from client
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user