Skip to content

Commit

Permalink
Use file type for checking if asset is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jul 11, 2024
1 parent abb68f6 commit c77f1e9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ public Void call() throws Exception {
public boolean update() {
// GTW: check if we have a file that was not preloaded and is not done loading yet
AssetLoader.AssetLoad assetLoader = AssetLoader.getInstance();

String path = resolve(loader, assetDesc).path();

if(!assetLoader.isAssetLoaded(Files.FileType.Internal, path)) {
FileHandle fileHandle = resolve(loader, assetDesc);
String path = fileHandle.path();
Files.FileType type = fileHandle.type();
if(!assetLoader.isAssetLoaded(type, path)) {
if(!assetLoader.isAssetInQueue(path)) {
count++;
if(count == 2) {
cancel = true;
}
else {
assetLoader.loadAsset(true, path, AssetType.Binary, Files.FileType.Internal, null);
assetLoader.loadAsset(true, path, AssetType.Binary, type, null);
}
}
}
Expand Down

0 comments on commit c77f1e9

Please sign in to comment.