MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Init

Method Init

Source/Engine/Platform/iOS/iOSPlatform.cpp:541–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541bool iOSPlatform::Init()
542{
543 if (ApplePlatform::Init())
544 return true;
545
546 // Setup screen scaling
547 ScreenScale = [[UIScreen mainScreen] scale];
548 CustomDpiScale *= ScreenScale;
549 Dpi = Math::TruncToInt(163 * ScreenScale);
550
551 // Get device identifier
552 NSString* uuid = [UIDevice currentDevice].identifierForVendor.UUIDString;
553 String uuidStr = AppleUtils::ToString((CFStringRef)uuid);
554 Guid::Parse(uuidStr, DeviceId);
555
556 // Setup native platform input devices
557 // TODO: add Gamepad for vibrations usability
558 Input::CustomDevices.Add(TouchScreen = New<iOSTouchScreen>());
559
560 // Use more aggressive content buffers freeing to reduce peek memory
561 ContentStorageManager::UnusedDataChunksLifetime = TimeSpan::FromMilliseconds(30);
562
563 return false;
564}
565
566void iOSPlatform::LogInfo()
567{

Callers

nothing calls this directly

Calls 5

InitFunction · 0.50
TruncToIntFunction · 0.50
ToStringFunction · 0.50
ParseFunction · 0.50
AddMethod · 0.45

Tested by

no test coverage detected