2022-08-25 12:58:35 +02:00
|
|
|
#include "applicationendhook.h"
|
|
|
|
#include "applicationends_function_replacements.h"
|
|
|
|
#include "logger.h"
|
|
|
|
|
|
|
|
|
|
|
|
void initApplicationEndsHook() {
|
|
|
|
DEBUG_FUNCTION_LINE("Patch ApplicationEndsHook functions");
|
|
|
|
for (uint32_t i = 0; i < applicationendshook_function_replacements_size; i++) {
|
2023-01-06 20:35:40 +01:00
|
|
|
bool wasPatched = false;
|
|
|
|
if (FunctionPatcher_AddFunctionPatch(&applicationendshook_function_replacements[i], nullptr, &wasPatched) != FUNCTION_PATCHER_RESULT_SUCCESS || !wasPatched) {
|
2022-08-25 12:58:35 +02:00
|
|
|
OSFatal("AromaBaseModule: Failed to patch ApplicationEndsHook function");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DEBUG_FUNCTION_LINE("Patch ApplicationEndsHook functions finished");
|
|
|
|
}
|