From 3dacb08954cf0c9004ba526f23dca42ab68c59e3 Mon Sep 17 00:00:00 2001 From: Bluvel Date: Fri, 19 Jul 2019 03:14:13 +0900 Subject: [PATCH] enable imagefile priority --- .../beatoraja/play/bga/BGAProcessor.java | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/bms/player/beatoraja/play/bga/BGAProcessor.java b/src/bms/player/beatoraja/play/bga/BGAProcessor.java index f141b380c..4205aa5a4 100644 --- a/src/bms/player/beatoraja/play/bga/BGAProcessor.java +++ b/src/bms/player/beatoraja/play/bga/BGAProcessor.java @@ -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); } } }