//
// cocos2d::CCApplication::setupVerticalSync from 0x180073d70 to 0x180073e1a (170 bytes)
//
// 4 xrefs:
// > cocos2d::CCApplication::run @ 0x1800734f0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b44a0
// > ??> @ 0x1801b44ac
//
// 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::CCApplication::setupVerticalSync(cocos2d::CCApplication *this)
{
__int64 (*ProcAddress)(void); // rdi
const char *v3; // rax
char *v4; // rax
const char *v5; // rax
ProcAddress = wglGetProcAddress("wglGetExtensionsStringEXT");
v3 = (const char *)ProcAddress();
v4 = strstr(v3, "WGL_EXT_swap_control");
if ( v4 )
{
v5 = (const char *)ProcAddress();
*((_BYTE *)this + 185) = strstr(v5, "EXT_swap_control_tear") != nullptr;
v4 = (char *)wglGetProcAddress("wglSwapIntervalEXT");
}
qword_1801A84C8 = (__int64)v4;
*((_BYTE *)this + 185) = (unsigned int)sub_1800D3240("WGL_EXT_swap_control_tear") == 1
|| (unsigned int)sub_1800D3240("GLX_EXT_swap_control_tear") == 1;
}