Skip to content

Commit

Permalink
Fix some @2x animation frames being listed as foreign
Browse files Browse the repository at this point in the history
  • Loading branch information
RoanH committed Dec 1, 2018
1 parent db41330 commit 7218098
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions osuSkinChecker/src/me/roan/osuskinchecker/ImageInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,21 @@ private File checkForFile(File folder, String name, boolean hd, final String ext
animated = true;
SkinChecker.allFiles.remove(match);
int c = 1;
File f = null;
File fhd;
File fsd;
while((fsd = new File(folder, name + "-" + c + "." + ext)).exists() || (f = new File(folder, name + "-" + c + "@2x." + ext)).exists()){
while(true){
fsd = new File(folder, name + "-" + c + "." + ext);
fhd = new File(folder, name + "-" + c + "@2x." + ext);

if(!fsd.exists() && !fhd.exists()){
break;
}

if(!hd){
empty = empty ? isEmptyImage(fsd) : false;
}
SkinChecker.allFiles.remove(fsd);
SkinChecker.allFiles.remove(f);
SkinChecker.allFiles.remove(fhd);
c++;
}
frames = c;
Expand All @@ -362,14 +369,21 @@ private File checkForFile(File folder, String name, boolean hd, final String ext
animated = true;
SkinChecker.allFiles.remove(match);
int c = 1;
File f = null;
File fhd;
File fsd;
while((fsd = new File(folder, name + c + "." + ext)).exists() || (f = new File(folder, name + c + "@2x." + ext)).exists()){
while(true){
fsd = new File(folder, name + c + "." + ext);
fhd = new File(folder, name + c + "@2x." + ext);

if(!fsd.exists() && !fhd.exists()){
break;
}

if(!hd){
empty = empty ? isEmptyImage(fsd) : false;
}
SkinChecker.allFiles.remove(fsd);
SkinChecker.allFiles.remove(f);
SkinChecker.allFiles.remove(fhd);
c++;
}
frames = c;
Expand Down

0 comments on commit 7218098

Please sign in to comment.