Mercurial > tablet-emu
diff src/protocol.rs @ 19:ba09079686a0
Add support for different endianness between client and server.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 26 Aug 2021 23:43:36 +0200 |
parents | 3f7b7a3ad8fe |
children |
line wrap: on
line diff
--- a/src/protocol.rs +++ b/src/protocol.rs @@ -14,11 +14,12 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. +use serde::{Serialize, Deserialize}; use bitflags::bitflags; bitflags! { /// This is the memory layout of the buttons on the 3DS. - #[derive(Default)] + #[derive(Serialize, Deserialize, Default)] pub struct Buttons: u32 { const A = 0x00000001; const B = 0x00000002; @@ -55,7 +56,7 @@ bitflags! { } } -#[derive(Debug, Default)] +#[derive(Serialize, Deserialize, Debug, Default)] pub struct Event { pub buttons: Buttons, pad: (i16, i16),