Skip to content

Commit fdbde53

Browse files
authored
Merge pull request #461 from NS-Kazuki/image
enable imagefile priority
2 parents bf9c1c9 + 3dacb08 commit fdbde53

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

src/bms/player/beatoraja/play/bga/BGAProcessor.java

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,27 @@ public synchronized void setModel(BMSModel model) {
129129
if (index != -1) {
130130
fex = name.substring(index + 1).toLowerCase();
131131
}
132-
if(fex != null && !(Arrays.asList(mov_extension).contains(fex))){
133-
f = dpath.resolve(name);
134-
}else if(fex != null){
135-
name = name.substring(0, index);
136-
for (String mov : mov_extension) {
137-
final Path mpgfile = dpath.resolve(name + "." + mov);
138-
if (Files.exists(mpgfile)) {
139-
f = mpgfile;
140-
break;
132+
if (fex != null) {
133+
if (Arrays.asList(mov_extension).contains(fex)){
134+
name = name.substring(0, index);
135+
for (String mov : mov_extension) {
136+
final Path mpgfile = dpath.resolve(name + "." + mov);
137+
if (Files.exists(mpgfile)) {
138+
f = mpgfile;
139+
break;
140+
}
141+
}
142+
}else if (Arrays.asList(BGImageProcessor.pic_extension).contains(fex)){
143+
name = name.substring(0, index);
144+
for (String pic : BGImageProcessor.pic_extension) {
145+
final Path picfile = dpath.resolve(name + "." + pic);
146+
if (Files.exists(picfile)) {
147+
f = picfile;
148+
break;
149+
}
141150
}
151+
}else{
152+
f = dpath.resolve(name);
142153
}
143154
}
144155
}

0 commit comments

Comments
 (0)