From f22d16941d7a14253b78f0f9e347725115ee314b Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 2 Nov 2014 01:39:12 +0100 Subject: [PATCH] =?UTF-8?q?Jetzt=20sollten=20auch=20Jars=20plattformunabh?= =?UTF-8?q?=C3=A4ngig=20laufen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/teamteamteam/spacescooter/utility/Loader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/utility/Loader.java b/src/de/teamteamteam/spacescooter/utility/Loader.java index 09bc442..6e380ba 100644 --- a/src/de/teamteamteam/spacescooter/utility/Loader.java +++ b/src/de/teamteamteam/spacescooter/utility/Loader.java @@ -22,7 +22,11 @@ public class Loader { * Return the loaded BufferedImage by its filename. */ public static BufferedImage getBufferedImageByFilename(String filename) { - return Loader.images.get(filename.replace("/", File.separator)); + if(CodeEnvironment.isJar()) { + return Loader.images.get(filename); + } else { + return Loader.images.get(filename.replace("/", File.separator)); + } } /**