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 holycanvas commented Oct 28, 2019

#5542

Changes:

  • 修复 iPad 平台检测,感谢 @krapnikkk 的贡献
  • 调整 cc.Asset.url 的注释
  • 最后一次使用2分钟后自动释放合并的 json

@holycanvas holycanvas requested a review from jareguo Oct 28, 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);
Copy link
Member

@jareguo jareguo Nov 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@jareguo jareguo Nov 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接 ++pack.duration > maxDuration 吧

@holycanvas holycanvas merged commit 9a8eef8 into cocos:v2.2.1-release Nov 1, 2019
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants