HACK: fix touch event on VIVO (#8563)

add NOTE
This commit is contained in:
PP
2021-04-26 22:23:20 +08:00
committed by GitHub
parent bd53bb1610
commit 4b8aeb35fa
+13 -1
View File
@@ -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 };