//
// cocos2d::CCEGLView::onGLFWWindowFocus from 0x18007a620 to 0x18007a753 (307 bytes)
//
// 3 xrefs:
// > sub_18007A760 @ 0x18007a775
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bed1c
//
// 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:22:00 +0000
//
void __fastcall cocos2d::CCEGLView::onGLFWWindowFocus(cocos2d::CCEGLView *this, struct GLFWwindow *a2, int a3)
{
__int64 v6; // rcx
struct cocos2d::CCApplication *v7; // rax
cocos2d::CCApplication *v8; // rax
HWND v9; // rax
byte_1801ACB90 = a3 != 0;
v6 = *((_QWORD *)this + 25);
if ( v6 )
{
if ( !a3 )
{
if ( *((_BYTE *)this + 236) )
sub_1800DD5A0(v6, 208897, 212993);
cocos2d::CCEGLView::clearQueuedInput(this);
goto LABEL_11;
}
}
else if ( !a3 )
{
goto LABEL_11;
}
if ( v6 && *((_BYTE *)this + 236) )
sub_1800DD5A0(v6, 208897, 212995);
v7 = cocos2d::CCApplication::sharedApplication();
(*(void (__fastcall **)(struct cocos2d::CCApplication *))(*(_QWORD *)v7 + 32LL))(v7);
v8 = cocos2d::CCApplication::sharedApplication();
cocos2d::CCApplication::resyncVerticalSync(v8);
LABEL_11:
if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) && *((_BYTE *)this + 234) )
{
v9 = (HWND)sub_1800D9CB0(a2);
if ( a3 )
{
SetWindowPos(v9, HWND_MESSAGE|0x2LL, 0, 0, 0, 0, 0x53u);
}
else
{
SetWindowPos(v9, (HWND)0xFFFFFFFFFFFFFFFELL, 0, 0, 0, 0, 0x13u);
*((_DWORD *)this + 47) = 2;
}
}
}