//
// cocos2d::CCTouchDispatcher::setPriority from 0xdb2428 to 0xdb2498 (112 bytes)
//
// 2 xrefs:
// > cocos2d::CCMenu::setHandlerPriority @ 0xd637c0
// > ??> @ 0xb2450
//
// This function is hookable on this platform (idp: arm, 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 13:08:40 +0000
//
__int64 __fastcall cocos2d::CCTouchDispatcher::setPriority(
cocos2d::CCArray **this,
int a2,
cocos2d::CCTouchDelegate *a3)
{
cocos2d::CCTouchHandler *Handler; // x21
__int64 result; // x0
Handler = cocos2d::CCTouchDispatcher::findHandler((cocos2d::CCTouchDispatcher *)this, a3);
result = cocos2d::CCTouchHandler::getPriority(Handler);
if ( (_DWORD)result != a2 )
{
cocos2d::CCTouchHandler::setPriority(Handler, a2);
cocos2d::CCTouchDispatcher::rearrangeHandlers((cocos2d::CCTouchDispatcher *)this, *(this + 8));
return cocos2d::CCTouchDispatcher::rearrangeHandlers((cocos2d::CCTouchDispatcher *)this, *(this + 9));
}
return result;
}