//
// cocos2d::CCApplication::setupVerticalSync from 0x180076a00 to 0x180076aaa (170 bytes)
//
// 3 xrefs:
// > cocos2d::CCApplication::run @ 0x180075f77
// > ??> @ 0x18014cf68
// > ??> @ 0x1801be854
//
// 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:21:58 +0000
//
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_1801B2508 = (__int64)v4;
*((_BYTE *)this + 185) = (unsigned int)sub_1800D79A0("WGL_EXT_swap_control_tear") == 1
|| (unsigned int)sub_1800D79A0("GLX_EXT_swap_control_tear") == 1;
}