Skip to content

Commit

Permalink
Merge pull request #461 from NS-Kazuki/image
Browse files Browse the repository at this point in the history
enable imagefile priority
  • Loading branch information
exch-bms2 authored Jul 22, 2019
2 parents bf9c1c9 + 3dacb08 commit fdbde53
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/bms/player/beatoraja/play/bga/BGAProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,27 @@ public synchronized void setModel(BMSModel model) {
if (index != -1) {
fex = name.substring(index + 1).toLowerCase();
}
if(fex != null && !(Arrays.asList(mov_extension).contains(fex))){
f = dpath.resolve(name);
}else if(fex != null){
name = name.substring(0, index);
for (String mov : mov_extension) {
final Path mpgfile = dpath.resolve(name + "." + mov);
if (Files.exists(mpgfile)) {
f = mpgfile;
break;
if (fex != null) {
if (Arrays.asList(mov_extension).contains(fex)){
name = name.substring(0, index);
for (String mov : mov_extension) {
final Path mpgfile = dpath.resolve(name + "." + mov);
if (Files.exists(mpgfile)) {
f = mpgfile;
break;
}
}
}else if (Arrays.asList(BGImageProcessor.pic_extension).contains(fex)){
name = name.substring(0, index);
for (String pic : BGImageProcessor.pic_extension) {
final Path picfile = dpath.resolve(name + "." + pic);
if (Files.exists(picfile)) {
f = picfile;
break;
}
}
}else{
f = dpath.resolve(name);
}
}
}
Expand Down

0 comments on commit fdbde53

Please sign in to comment.