From 8301d73790eed4b3207a53052786ef6167194752 Mon Sep 17 00:00:00 2001 From: jugeeya Date: Sat, 26 Sep 2020 00:57:25 +0000 Subject: [PATCH] use nnsdk hid imports --- src/training/mod.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/training/mod.rs b/src/training/mod.rs index 288098c..29e0d43 100644 --- a/src/training/mod.rs +++ b/src/training/mod.rs @@ -1,6 +1,7 @@ use crate::common::{is_training_mode, FIGHTER_MANAGER_ADDR, STAGE_MANAGER_ADDR}; use crate::hitbox_visualizer; use skyline::nn::ro::LookupSymbol; +use skyline::nn::hid::*; use smash::app::{self, lua_bind::*}; use smash::lib::lua_const::*; use smash::params::*; @@ -267,26 +268,6 @@ fn params_main(params_info: &ParamsInfo<'_>) { } } -extern "C" { - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_17NpadHandheldStateERKj"] - pub fn GetNpadHandheldState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); - - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_16NpadFullKeyStateERKj"] - pub fn GetNpadFullKeyState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); - - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_11NpadGcStateERKj"] - pub fn GetNpadGcState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); - - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_16NpadJoyDualStateERKj"] - pub fn GetNpadJoyDualState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); - - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_16NpadJoyLeftStateERKj"] - pub fn GetNpadJoyLeftState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); - - #[link_name = "\u{1}_ZN2nn3hid12GetNpadStateEPNS0_17NpadJoyRightStateERKj"] - pub fn GetNpadJoyRightState(arg1: *mut skyline::nn::hid::NpadHandheldState, arg2: *const u32); -} - create_nn_hid_hooks!( (GetNpadHandheldState, handle_get_npad_handheld_state), (GetNpadFullKeyState, handle_get_npad_full_key_state),