//
// PlatformerControlsPopup::onToggleSource from 0x140451730 to 0x1404517bb (139 bytes)
//
// 2 xrefs:
// > PlatformerControlsPopup::init @ 0x14044f348
// > ??> @ 0x1409277d0
//
// 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:32:27 +0000
//
void __fastcall PlatformerControlsPopup::onToggleSource(__int64 a1)
{
__int64 v2; // rcx
BOOL v3; // r8d
__int64 v4; // rcx
__int64 v5; // rax
void (__fastcall ***v6)(_QWORD, const char *); // rcx
const char *v7; // rdx
v2 = *(_QWORD *)(a1 + 1032);
if ( v2 )
{
v3 = 0;
*(_DWORD *)(v2 + 2096) = *(_DWORD *)(v2 + 2096) != 1;
v4 = *(_QWORD *)(a1 + 1104);
if ( v4 )
{
v5 = *(_QWORD *)(a1 + 1032);
if ( v5 )
v3 = *(_DWORD *)(v5 + 2096) == 1;
v6 = (void (__fastcall ***)(_QWORD, const char *))(v4 + 360);
v7 = "Edit Global Controls";
if ( v3 )
v7 = "Edit Custom Controls";
(**v6)(v6, v7);
}
PlatformerControlsPopup::refreshModeUI(a1);
PlatformerControlsPopup::reapplyRuntime();
}
}