--- Daodan/src/Patches/Cheater.c 2015/03/23 23:29:19 1017 +++ Daodan/src/Patches/Cheater.c 2021/10/24 02:50:48 1163 @@ -296,7 +296,7 @@ void __stdcall FallingFrames(void* Ebp) } -static void BindableCheatCallback (CustomActionCallbackArgument cheatnum) { +static void BindableCheatCallback (intptr_t cheatnum) { uint8_t res = DDrCheater (cheatnum); if (res) COrMessage_Print(DDr_CheatTable[cheatnum].message_on, 0, 240); @@ -307,9 +307,8 @@ static void BindableCheatCallback (Custo void InitBindableCheats() { oniCheatCode* cur; for (cur = DDr_CheatTable; cur->name != 0; cur++) { -// char* val = malloc(20); -// sprintf(val, "cheat_%s", cur->name); - Input_RegisterCustomAction (cur->name, EVENT_KEYPRESS, 0, BindableCheatCallback, cur->func); + DDrInput_RegisterCustomAction(cur->name, DDcEventType_KeyPress, + BindableCheatCallback, cur->func); } }