12static pthread_mutex_t FrontMutex;
13static bool FrontHooked = FALSE;
15static void (*Front_TxPacket_orig)(
byte *Data) = NULL;
16static int (*PutMsgQ_orig)(dword *MsgQ, dword *Data) = NULL;
20 pthread_mutex_lock(&FrontMutex);
21 Front_TxPacket_orig(Data);
22 pthread_mutex_unlock(&FrontMutex);
28 static dword *_MsgQ_Front = NULL;
35 _MsgQ_Front = (dword*)
TryResolve(
"_chKeyInputTime");
36 if(_MsgQ_Front) _MsgQ_Front = (dword*)*(_MsgQ_Front + 2);
39 if((MsgQ == _MsgQ_Front) && (Data[0] == 0x00000001))
68 ret = PutMsgQ_orig(MsgQ, Data);
128 int WaitTimeout, Repeat;
148 }
while((WaitTimeout == 0) && Repeat);
180 }
while((WaitTimeout == 0) && Repeat);
202 }
while((WaitTimeout == 0) && Repeat);
int PutMsgQ_hooked(dword *MsgQ, dword *Data)
byte FPPatchPowerRestoreOption
bool HookFrontTxPacket(void)
void UnhookFrontTxPacket(void)
byte FPPatchAntiFreezeOption
void Front_TxPacket_hooked(byte *Data)
bool HookFirmware(char *FirmwareFunctionName, void *RedirectTo, void *PointerToOriginal)
void LogEntryFBLibPrintf(bool Console, char *format,...)
dword TryResolve(char *Function)
bool UnhookFirmware(char *FirmwareFunctionName, void *RedirectTo, void *PointerToOriginal)