Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion cc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,20 @@
"ccGlobal": true,
"internal": false
},
"SUD": {
"comment": "Running in the sud's quick game.",
"type": "boolean",
"value": false,
"ccGlobal": true,
"internal": false
},
"SUDV2": {
"comment": "Running in the sud v2's quick game.",
"type": "boolean",
"value": false,
"ccGlobal": true,
"internal": false
},
"EDITOR": {
"comment": "Running in the editor.",
"type": "boolean",
Expand Down Expand Up @@ -710,7 +724,7 @@
"RUNTIME_BASED": {
"comment": "Running in runtime based environment.",
"type": "boolean",
"value": "$OPPO || $VIVO || $HUAWEI || $MIGU || $HONOR || $COCOS_RUNTIME",
"value": "$OPPO || $VIVO || $HUAWEI || $MIGU || $HONOR || $COCOS_RUNTIME || $SUD || $SUDV2",
"ccGlobal": true,
"internal": false
},
Expand Down
2 changes: 2 additions & 0 deletions pal/system-info/enum-type/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ export enum Platform {
HUAWEI_QUICK_GAME = 'HUAWEI_QUICK_GAME',
MIGU_MINI_GAME = 'MIGU_MINI_GAME',
HONOR_MINI_GAME = 'HONOR_MINI_GAME',
SUD_MINI_GAME = 'SUD_MINI_GAME',
SUDV2_MINI_GAME = 'SUDV2_MINI_GAME',
}
6 changes: 5 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, BYTEDANCE, HUAWEI, OPPO, RUNTIME_BASED, VIVO, MIGU, HONOR, WECHAT, XIAOMI, DEBUG, TEST, TAOBAO, TAOBAO_MINIGAME, WECHAT_MINI_PROGRAM } from 'internal:constants';
import { ALIPAY, BYTEDANCE, HUAWEI, OPPO, RUNTIME_BASED, SUD, SUDV2, VIVO, MIGU, HONOR, 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 190. Maximum allowed is 150
import { minigame, SystemInfo as MinigameSystemInfo } from 'pal/minigame';
import { IFeatureMap } from 'pal/system-info';
import { EventTarget } from '../../../cocos/core/event';
Expand Down Expand Up @@ -57,6 +57,10 @@
currentPlatform = Platform.MIGU_MINI_GAME;
} else if (HONOR) {
currentPlatform = Platform.HONOR_MINI_GAME;
} else if (SUD) {
currentPlatform = Platform.SUD_MINI_GAME;
} else if (SUDV2) {
currentPlatform = Platform.SUDV2_MINI_GAME;
}

let isVersionGreaterOrEqualTo;
Expand Down Expand Up @@ -124,7 +128,7 @@
_cachedSystemInfo = originalGetSystemInfoSync.call(minigame);
});

minigame.getSystemInfoSync = function (): MinigameSystemInfo {

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

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected unnamed function
return _cachedSystemInfo;
};

Expand Down
Loading
Loading