//
// cocos2d::CCEGLView::onGLFWframebuffersize from 0x180077cb0 to 0x180077df8 (328 bytes)
//
// 3 xrefs:
// > sub_180077E00 @ 0x180077e18
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b4a4c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCEGLView::onGLFWframebuffersize(
cocos2d::CCEGLView *this,
struct GLFWwindow *a2,
int a3,
int a4)
{
float width; // xmm3_4
float v5; // xmm5_4
float v6; // xmm1_4
float height; // xmm4_4
float v9; // xmm6_4
float v10; // xmm2_4
char v11; // al
float v12; // xmm0_4
__int64 v13; // r8
__int64 v14; // rdx
width = this->m_obScreenSize.width;
v5 = *((float *)this + 48);
v6 = (float)*((int *)this + 45);
height = this->m_obScreenSize.height;
v9 = (float)((float)(width / (float)a3) * v6) * v5;
v10 = (float)((float)(height / (float)a4) * v6) * v5;
if ( fabs(v9 - 0.5) < 0.00000011920929 && fabs(v10 - 0.5) < 0.00000011920929 )
{
v11 = -*((_BYTE *)this + 179);
*((_BYTE *)this + 178) = 1;
*((_DWORD *)this + 45) = 2 - (v11 != 0);
v12 = (float)(2 - (v11 != 0));
v13 = (unsigned int)(int)(float)((float)((float)(height * 0.5) * v12) * v5);
v14 = (unsigned int)(int)(float)((float)((float)(width * 0.5) * v12) * v5);
LABEL_7:
sub_1800D4C40(a2, v14, v13);
return;
}
if ( fabs(v9 - 2.0) < 0.00000011920929 && fabs(v10 - 2.0) < 0.00000011920929 )
{
*((_BYTE *)this + 178) = 0;
*((_DWORD *)this + 45) = 1;
v13 = (unsigned int)(int)(float)(v5 * height);
v14 = (unsigned int)(int)(float)(v5 * width);
goto LABEL_7;
}
}