//
// cocos2d::CCEGLView::~CCEGLView from 0x180075a50 to 0x180075b7b (299 bytes)
//
// 4 xrefs:
// > sub_180075BB0 @ 0x180075c0e
// > sub_180075BB0 @ 0x180075bcc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b46c8
//
// 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::~CCEGLView(cocos2d::CCEGLView *this)
{
_Thrd_t v2; // [rsp+20h] [rbp-18h] BYREF
this->__vftable = (cocos2d::CCEGLView_vtbl *)&cocos2d::CCEGLView::`vftable'{for `cocos2d::CCEGLViewProtocol'};
*(_QWORD *)&this->m_idk1 = &cocos2d::CCEGLView::`vftable'{for `cocos2d::CCObject'};
byte_1801A8528 = 0;
if ( hWnd )
PostMessageA(hWnd, 0x12u, 0, 0);
if ( dword_1801A8538 )
{
if ( dword_1801A8538 == Thrd_id() )
{
LABEL_12:
std::_Throw_Cpp_error(5);
JUMPOUT(0x180075B7ALL);
}
v2 = (_Thrd_t)unk_1801A8530;
if ( Thrd_join(&v2, nullptr) )
{
std::_Throw_Cpp_error(2);
__debugbreak();
}
unk_1801A8530 = 0;
}
hWnd = nullptr;
if ( Mtx_lock((_Mtx_t)&unk_1801A8558) )
goto LABEL_12;
if ( dword_1801A85A4 == 0x7FFFFFFF )
{
dword_1801A85A4 = 2147483646;
std::_Throw_Cpp_error(6);
__debugbreak();
}
sub_180076360(&xmmword_1801A85A8);
Mtx_unlock((_Mtx_t)&unk_1801A8558);
sub_180076710(&dword_1801A85D0);
qword_1801A8500 = nullptr;
sub_1800D39A0();
cocos2d::CCObject::~CCObject((cocos2d::CCObject *)&this->m_idk1);
cocos2d::CCEGLViewProtocol::~CCEGLViewProtocol(this);
}