From a3cd48b6db9ab11d52779b460dd605ec953955e3 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 18 Oct 2023 20:23:53 -0700 Subject: [PATCH] why not it work??? --- src/sniffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sniffer.rs b/src/sniffer.rs index 26c5c88..03f29a4 100644 --- a/src/sniffer.rs +++ b/src/sniffer.rs @@ -122,7 +122,7 @@ fn write_input_instruction(state:&mut InputInstructionDeltaSta |crate::physics::InputInstruction::Idle=>0u32,//TODO: don't write idle instructions }; //instruction id packed with game control parity bit. This could be 1 byte but it ruins the alignment - w.write(&(ins.instruction as u32|parity).to_le_bytes());//4B + w.write(&(unsafe{std::mem::transmute::(ins.instruction)}|parity).to_le_bytes());//4B match &ins.instruction{ &crate::physics::InputInstruction::MoveMouse(m)=>{//4B let dm=m-state.mouse_pos;