mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
add getSafeArea for android and iOS (#3067)
This commit is contained in:
@@ -130,8 +130,8 @@ Device::NetworkType Device::getNetworkType()
|
||||
|
||||
cc::Vec4 Device::getSafeAreaEdge()
|
||||
{
|
||||
// no SafeArea concept on android, return ZERO Vec4.
|
||||
return cc::Vec4();
|
||||
float *data = JniHelper::callStaticFloatArrayMethod(JCLS_HELPER, "getSafeArea");
|
||||
return cc::Vec4(data[0], data[1], data[2],data[3]);
|
||||
}
|
||||
|
||||
float Device::getDevicePixelRatio()
|
||||
|
||||
Reference in New Issue
Block a user