Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix platform detection #5635

Merged
merged 8 commits into from Nov 1, 2019
Merged

Conversation

@holycanvas
Copy link
Contributor

holycanvas commented Oct 28, 2019

#5542

Changes:

  • 修复 iPad 平台检测,感谢 @krapnikkk 的贡献
  • 调整 cc.Asset.url 的注释
  • 最后一次使用2分钟后自动释放合并的 json
@holycanvas holycanvas requested a review from jareguo Oct 28, 2019
holycanvas added 3 commits Oct 29, 2019
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
cocos2d/core/load-pipeline/pack-downloader.js Outdated Show resolved Hide resolved
var unpackerData = globalUnpackers[packUuid];
if (unpackerData) {
cc.loader.release(unpackerData.url);
delete globalUnpackers[packUuid];
delete toBeChecked[packUuid];
var index = toBeChecked.indexOf(packUuid);
cc.js.array.fastRemoveAt(toBeChecked, index);

This comment has been minimized.

Copy link
@jareguo

jareguo Nov 1, 2019

Contributor

cc.js.array.fastRemove(toBeChecked, packUuid); 就行

var id = toBeChecked[i];
var pack = globalUnpackers[id];
pack.duration++;
if (pack.duration > maxDuration) {

This comment has been minimized.

Copy link
@jareguo

jareguo Nov 1, 2019

Contributor

直接 ++pack.duration > maxDuration 吧

@holycanvas holycanvas merged commit 9a8eef8 into cocos-creator:v2.2.1-release Nov 1, 2019
1 check passed
1 check passed
ci/circleci: test Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.