From ecd4e07f90e6c9d5ec9444e5f20924e6fc3b20c3 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 22 Jul 2022 13:43:47 +0200 Subject: [PATCH] Remove Mocha_RPXHookCompleted and Mocha_StartMCPThread --- include/mocha/mocha.h | 18 ------------------ source/utils.cpp | 31 ------------------------------- 2 files changed, 49 deletions(-) diff --git a/include/mocha/mocha.h b/include/mocha/mocha.h index 909aec7..f85bcb6 100644 --- a/include/mocha/mocha.h +++ b/include/mocha/mocha.h @@ -50,24 +50,6 @@ MochaUtilsStatus Mocha_CheckAPIVersion(uint32_t *outVersion); */ MochaUtilsStatus Mocha_GetEnvironmentPath(char *environmentPathBuffer, uint32_t bufferLen); -/*** - * Signals Mocha to not redirect the men.rpx to root.rpx anymore -* @return MOCHA_RESULT_SUCCESS -* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.
-* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.
-* MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path. - */ -MochaUtilsStatus Mocha_RPXHookCompleted(); - -/*** -* Starts the MCP Thread in mocha to allows usage of /dev/iosuhax and wupclient -* @return MOCHA_RESULT_SUCCESS -* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.
-* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.
-* MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path. - */ -MochaUtilsStatus Mocha_StartMCPThread(); - /*** * Starts the MCP Thread in mocha to allows usage of /dev/iosuhax and wupclient * @return MOCHA_RESULT_SUCCESS diff --git a/source/utils.cpp b/source/utils.cpp index 0e1d779..1d154be 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -80,37 +80,6 @@ MochaUtilsStatus Mocha_GetEnvironmentPath(char *environmentPathBuffer, uint32_t return res; } -MochaUtilsStatus Mocha_SimpleCommand(uint32_t command, uint32_t apiVersion) { - if (!mochaInitDone) { - return MOCHA_RESULT_LIB_UNINITIALIZED; - } - if (mochaApiVersion < apiVersion) { - return MOCHA_RESULT_UNSUPPORTED_COMMAND; - } - MochaUtilsStatus res = MOCHA_RESULT_UNKNOWN_ERROR; - int mcpFd = IOS_Open("/dev/mcp", (IOSOpenMode) 0); - if (mcpFd >= 0) { - ALIGN_0x40 uint32_t io_buffer[0x40 / 4]; - io_buffer[0] = command; - - if (IOS_Ioctl(mcpFd, 100, io_buffer, 4, io_buffer, 0x4) == IOS_ERROR_OK) { - res = MOCHA_RESULT_SUCCESS; - } - - IOS_Close(mcpFd); - } - - return res; -} - -MochaUtilsStatus Mocha_RPXHookCompleted() { - return Mocha_SimpleCommand(IPC_CUSTOM_MEN_RPX_HOOK_COMPLETED, 1); -} - -MochaUtilsStatus Mocha_StartMCPThread() { - return Mocha_SimpleCommand(IPC_CUSTOM_START_MCP_THREAD, 1); -} - MochaUtilsStatus Mocha_StartUSBLogging(bool avoidLogCatchup) { if (!mochaInitDone) { return MOCHA_RESULT_LIB_UNINITIALIZED;