//
// GameToolbox::touchUnitsForMM from 0x69b810 to 0x69b880 (112 bytes)
//
// 12 xrefs:
// > CCTextInputNode::ccTouchMoved @ 0x6b8a3c
// > GJTransformControl::snapToNearestVertex @ 0xbd1d10
// > GJTransformControl::snapToGrid @ 0xbd2440
// > EditorUI::ccTouchBegan @ 0xbd5818
// > EditorUI::ccTouchEnded @ 0xbd6400
// > EditorUI::ccTouchEnded @ 0xbd6420
// > EditorUI::ccTouchEnded @ 0xbd6550
// > TouchControlEditLayer::beginDeadzoneDrag @ 0xd04d98
// > TouchControlEditLayer::ccTouchBegan @ 0xd04eec
// > TouchControlEditLayer::ccTouchBegan @ 0xd04ef8
// > TouchControlEditLayer::ccTouchBegan @ 0xd04f04
// > ??> @ 0xa9048
//
// This function is hookable on this platform (idp: arm, 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 12:50:40 +0000
//
float __fastcall GameToolbox::touchUnitsForMM(GameToolbox *this, float a2)
{
cocos2d::CCEGLView *DPI; // x0
int v4; // w19
cocos2d::CCEGLViewProtocol *v5; // x0
float v6; // s0
DPI = (cocos2d::CCEGLView *)cocos2d::CCDevice::getDPI(this);
v4 = (int)DPI;
v5 = (cocos2d::CCEGLViewProtocol *)cocos2d::CCEGLView::sharedOpenGLView(DPI);
cocos2d::CCEGLViewProtocol::getScaleY(v5);
if ( v4 <= 0 || v6 <= 0.0 )
return a2 * 4.9;
else
return (float)((float)((float)v4 * a2) / 25.4) / v6;
}