mirror of
https://github.com/Maschell/hid_to_vpad.git
synced 2024-11-27 16:54:14 +01:00
Use the new controller_patcher
- Adjusting loading the configs. (Mount the SD Card before initialization and provide the path of the configs)
This commit is contained in:
parent
3f1872437c
commit
7b08a7eaa6
@ -1 +1 @@
|
||||
Subproject commit c9284c023845a23f049c50d7b4c2f6348431da8f
|
||||
Subproject commit 409871f29db2ec6222a9cabcbfcf33eea8998bbe
|
13
src/main.cpp
13
src/main.cpp
@ -75,11 +75,15 @@ extern "C" s32 Menu_Main(void){
|
||||
log_init();
|
||||
DEBUG_FUNCTION_LINE("HID to VPAD %s - %s %s - by Maschell\n\n",APP_VERION,__DATE__,__TIME__);
|
||||
|
||||
|
||||
DEBUG_FUNCTION_LINE("Mount SD partition\n");
|
||||
mount_sd_fat("sd");
|
||||
|
||||
//!*******************************************************************
|
||||
//! Initialize HID Config *
|
||||
//!*******************************************************************
|
||||
DEBUG_FUNCTION_LINE("Initializing the controller data\n");
|
||||
bool res = ControllerPatcher::Init();
|
||||
bool res = ControllerPatcher::Init(CONTROLLER_PATCHER_PATH);
|
||||
if(!res){
|
||||
SplashScreen(5, std::string("Error. The app starts in 5 seconds without patches.").c_str(),0,0);
|
||||
RestorePatches();
|
||||
@ -96,9 +100,6 @@ extern "C" s32 Menu_Main(void){
|
||||
//!*******************************************************************
|
||||
DEBUG_FUNCTION_LINE("Initialize memory management\n");
|
||||
memoryInitialize();
|
||||
|
||||
DEBUG_FUNCTION_LINE("Mount SD partition\n");
|
||||
mount_sd_fat("sd");
|
||||
DEBUG_FUNCTION_LINE("Start main application\n");
|
||||
result = Application::instance()->exec();
|
||||
DEBUG_FUNCTION_LINE("Main application stopped result: %d\n",result);
|
||||
@ -108,14 +109,14 @@ extern "C" s32 Menu_Main(void){
|
||||
ControllerPatcher::setRumbleActivated(rumble);
|
||||
bool networkController = CSettings::instance()->getValueAsBool(CSettings::NetworkControllerActivated);
|
||||
ControllerPatcher::setNetworkControllerActivated(networkController);
|
||||
DEBUG_FUNCTION_LINE("Unmount SD\n");
|
||||
unmount_sd_fat("sd");
|
||||
DEBUG_FUNCTION_LINE("Release memory\n");
|
||||
memoryRelease();
|
||||
ControllerPatcher::destroyConfigHelper();
|
||||
CSettings::destroyInstance();
|
||||
}
|
||||
|
||||
unmount_sd_fat("sd");
|
||||
DEBUG_FUNCTION_LINE("Unmount SD\n");
|
||||
|
||||
//!*******************************************************************
|
||||
//! Patching functions *
|
||||
|
Loading…
Reference in New Issue
Block a user