mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
bug fix for xiaomi (#6067)
This commit is contained in:
+1
-1
@@ -854,7 +854,7 @@ export class Game extends EventTarget {
|
||||
if (this.renderType === Game.RENDER_TYPE_WEBGL) {
|
||||
let useWebGL2 = (!!window.WebGL2RenderingContext);
|
||||
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
const userAgent = window.navigator.userAgent.toLowerCase();
|
||||
if (userAgent.indexOf('safari') !== -1) {
|
||||
if (userAgent.indexOf('chrome') === -1) {
|
||||
useWebGL2 = false;
|
||||
|
||||
Reference in New Issue
Block a user