mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
+13
-1
@@ -1,4 +1,6 @@
|
||||
import { IMiniGame } from 'pal/minigame';
|
||||
import { VIVO } from 'internal:constants';
|
||||
import { SystemInfo, IMiniGame } from 'pal/minigame';
|
||||
|
||||
import { Orientation } from '../system/enum-type/orientation';
|
||||
import { cloneObject, createInnerAudioContextPolyfill } from '../utils';
|
||||
|
||||
@@ -86,4 +88,14 @@ minigame.getSafeArea = function () {
|
||||
return { top, left, bottom, right, width, height };
|
||||
};
|
||||
|
||||
if (VIVO) {
|
||||
// HACK: need to be handled in ral lib.
|
||||
minigame.getSystemInfoSync = function () {
|
||||
const sys = ral.getSystemInfoSync() as SystemInfo;
|
||||
sys.windowWidth = sys.screenWidth;
|
||||
sys.windowHeight = sys.screenHeight;
|
||||
return sys;
|
||||
};
|
||||
}
|
||||
|
||||
export { minigame };
|
||||
|
||||
Reference in New Issue
Block a user