//
// cocos2d::CCKeyboardDispatcher::addDelegate from 0x180045aa0 to 0x180045ae4 (68 bytes)
//
// 4 xrefs:
// > cocos2d::CCLayer::onEnter @ 0x180052453
// > cocos2d::CCLayer::setKeyboardEnabled @ 0x180052a57
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb890
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:40 +0000
//
void __fastcall cocos2d::CCKeyboardDispatcher::addDelegate(
cocos2d::CCKeyboardDispatcher *this,
struct cocos2d::CCKeyboardDelegate *a2)
{
struct cocos2d::CCObject *v3; // rax
if ( a2 )
{
if ( *((_BYTE *)this + 64) )
{
sub_1800A1E00(*((_QWORD *)this + 9));
*((_BYTE *)this + 65) = 1;
}
else
{
v3 = cocos2d::CCKeyboardHandler::handlerWithDelegate(a2);
if ( v3 )
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 7), v3);
}
}
}