Fixed setup

This commit is contained in:
Maschell 2016-04-25 21:05:45 +02:00
parent a26a2c9c4e
commit 440528f948

View File

@ -5,6 +5,8 @@
#include "controller_patcher.h" #include "controller_patcher.h"
#include "dynamic_libs/os_functions.h" #include "dynamic_libs/os_functions.h"
#include "dynamic_libs/sys_functions.h" #include "dynamic_libs/sys_functions.h"
#include "dynamic_libs/syshid_functions.h"
#include "dynamic_libs/socket_functions.h"
#include "cp_retain_vars.h" #include "cp_retain_vars.h"
#include "utils/logger.h" #include "utils/logger.h"
@ -14,6 +16,9 @@ void setConfigValue(u8 * dest, u8 first, u8 second){
} }
void init_config_controller(){ void init_config_controller(){
InitOSFunctionPointers();
InitSysHIDFunctionPointers();
InitVPadFunctionPointers();
if(!config_done){ if(!config_done){
config_done = 1; config_done = 1;
memset(config_controller,CONTROLLER_PATCHER_INVALIDVALUE,sizeof(config_controller)); // Init / Invalid everything memset(config_controller,CONTROLLER_PATCHER_INVALIDVALUE,sizeof(config_controller)); // Init / Invalid everything
@ -257,6 +262,15 @@ void init_config_controller(){
}else{ }else{
log_print("Config already done!\n"); log_print("Config already done!\n");
} }
if(!gHIDSetupDone){
HIDSetup();
gHIDSetupDone = 1;
}
if(!gHIDAttached){
HIDAddClient(&gHIDClient, my_attach_cb);
}
} }
void deinit_config_controller(){ void deinit_config_controller(){