//
// cocos2d::CCDevice::getDPI from 0x180077c20 to 0x180077cb8 (152 bytes)
//
// 4 xrefs:
// > ??> @ 0x180144700
// > ??> @ 0x180144710
// > ??> @ 0x18014cf68
// > ??> @ 0x1801be98c
//
// 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:59 +0000
//
__int64 __fastcall cocos2d::CCDevice::getDPI()
{
__int64 result; // rax
HDC DC; // rsi
int DeviceCaps; // edi
int v3; // ebx
result = (unsigned int)dword_1801ACB88;
if ( dword_1801ACB88 == -1 )
{
DC = GetDC(nullptr);
DeviceCaps = GetDeviceCaps(DC, 8);
v3 = GetDeviceCaps(DC, 4);
ReleaseDC(nullptr, DC);
dword_1801ACB88 = (int)(float)((float)((float)((float)DeviceCaps * 254.0) / (float)v3) / 10.0);
return (unsigned int)dword_1801ACB88;
}
return result;
}