From ce8d9527827f67cd6eb3e23edecdd8735ffcb0e6 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 2 Jan 2022 16:31:47 +0000 Subject: [PATCH] key_config -> keyboard_config --- src/packet/login.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/packet/login.rs b/src/packet/login.rs index fbaf565..40a47ad 100644 --- a/src/packet/login.rs +++ b/src/packet/login.rs @@ -210,7 +210,7 @@ pub struct RequestSettings { #[pso_packet(0xE2)] pub struct SendKeyAndTeamSettings { unknown: [u8; 0x114], - key_config: [u8; 0x16C], + keyboard_config: [u8; 0x16C], gamepad_config: [u8; 0x38], guildcard: u32, team_id: u32, @@ -226,10 +226,10 @@ pub struct SendKeyAndTeamSettings { } impl SendKeyAndTeamSettings { - pub fn new(key_config: [u8; 0x16C], gamepad_config: [u8; 0x38], guildcard: u32, team_id: u32) -> SendKeyAndTeamSettings { + pub fn new(keyboard_config: [u8; 0x16C], gamepad_config: [u8; 0x38], guildcard: u32, team_id: u32) -> SendKeyAndTeamSettings { SendKeyAndTeamSettings { unknown: [0; 0x114], - key_config: key_config, + keyboard_config: keyboard_config, gamepad_config: gamepad_config, guildcard: guildcard, team_id: team_id, @@ -550,16 +550,16 @@ mod tests { let mut rng = rand::thread_rng(); - let mut key_config = [0u8; 0x16C]; + let mut keyboard_config = [0u8; 0x16C]; let mut gamepad_config = [0u8; 0x38]; - rng.fill(&mut key_config[..]); + rng.fill(&mut keyboard_config[..]); rng.fill(&mut gamepad_config[..]); - let pkt = super::SendKeyAndTeamSettings::new(key_config, gamepad_config, 123, 456); + let pkt = super::SendKeyAndTeamSettings::new(keyboard_config, gamepad_config, 123, 456); let bytes = pkt.as_bytes(); assert!(bytes[2] == 0xe2); - assert!(bytes[8 + 0x114] == key_config[0]); + assert!(bytes[8 + 0x114] == keyboard_config[0]); assert!(bytes[8 + 0x114 + 0x16C] == gamepad_config[0]); }