Skip to content

Commit

Permalink
Added MIGU channel identifiers (#17687)
Browse files Browse the repository at this point in the history
Co-authored-by: lbq <[email protected]>
  • Loading branch information
W-MTZing and MTZing authored Oct 10, 2024
1 parent 5fc8e98 commit 7bbc5fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,13 @@
"ccGlobal": true,
"internal": false
},
"MIGU": {
"comment": "Running in the migu's quick game.",
"type": "boolean",
"value": false,
"ccGlobal": true,
"internal": false
},

"EDITOR": {
"comment": "Running in the editor.",
Expand Down
1 change: 1 addition & 0 deletions pal/system-info/enum-type/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ export enum Platform {
COCOSPLAY = 'COCOSPLAY',
LINKSURE_MINI_GAME = 'LINKSURE_MINI_GAME',
QTT_MINI_GAME = 'QTT_MINI_GAME',
MIGU_MINI_GAME = 'MIGU_MINI_GAME',
}
4 changes: 3 additions & 1 deletion pal/system-info/minigame/system-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
THE SOFTWARE.
*/

import { ALIPAY, BAIDU, BYTEDANCE, COCOSPLAY, HUAWEI, LINKSURE, OPPO, QTT, VIVO, WECHAT, XIAOMI, DEBUG, TEST, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM } from 'internal:constants';
import { ALIPAY, BAIDU, BYTEDANCE, COCOSPLAY, HUAWEI, LINKSURE, OPPO, QTT, VIVO, MIGU, WECHAT, XIAOMI, DEBUG, TEST, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM } from 'internal:constants';

Check warning on line 25 in pal/system-info/minigame/system-info.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 189. Maximum allowed is 150
import { minigame } from 'pal/minigame';
import { IFeatureMap } from 'pal/system-info';
import { EventTarget } from '../../../cocos/core/event';
Expand Down Expand Up @@ -60,6 +60,8 @@ if (WECHAT) {
currentPlatform = Platform.LINKSURE_MINI_GAME;
} else if (QTT) {
currentPlatform = Platform.QTT_MINI_GAME;
} else if (MIGU) {
currentPlatform = Platform.MIGU_MINI_GAME;
}

let isVersionGreaterOrEqualTo;
Expand Down
1 change: 1 addition & 0 deletions platforms/runtime/platforms/migu-mini-game/engine/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('../../../common/engine/index');

0 comments on commit 7bbc5fa

Please sign in to comment.