mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 15:42:39 +08:00
feat(minigame): 支付宝小程序添加安全区域获取功能 (#44)
This commit is contained in:
@@ -149,8 +149,12 @@ minigame.stopAccelerometer = function (res: any): void {
|
||||
|
||||
// #region SafeArea
|
||||
minigame.getSafeArea = function (): SafeArea {
|
||||
if (typeof minigame.getWindowInfo === "function") {
|
||||
const windowInfo = minigame.getWindowInfo();
|
||||
return windowInfo.safeArea;
|
||||
}
|
||||
console.warn('getSafeArea is not supported on this platform');
|
||||
const systemInfo = minigame.getSystemInfoSync();
|
||||
const systemInfo = minigame.getSystemInfoSync();
|
||||
return {
|
||||
top: 0,
|
||||
left: 0,
|
||||
|
||||
Reference in New Issue
Block a user