//
// KeybindCapturePopup::onToggleController from 0x79b2c2 to 0x79b316 (84 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:49 +0000
//
int __fastcall KeybindCapturePopup::onToggleController(KeybindCapturePopup *this, cocos2d::CCObject *a2)
{
int result; // r0
int v4; // r5
int v5; // r1
unsigned __int16 v6; // r0
result = *((_DWORD *)this + 187);
if ( result )
{
v4 = *(unsigned __int8 *)(result + 268) ^ 1;
ControllerInputNode::setController2((ControllerInputNode *)result, v4);
result = *((_DWORD *)this + 183);
if ( result )
{
result = GJKeybindManager::isControllerChord((GJKeybindManager *)result, v5);
if ( result )
{
v6 = *((_WORD *)this + 366);
if ( v4 )
{
if ( (v6 & 1) != 0 )
++v6;
}
else if ( (v6 & 1) == 0 )
{
--v6;
}
*((_DWORD *)this + 183) = GJKeybindManager::encodeChord(v6, 0, 0, 0);
return KeybindCapturePopup::updateChordDisplay(this);
}
}
}
return result;
}