aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
authorsyeyoung <cyougn06@naver.com>2022-01-31 22:57:57 +0900
committersyeyoung <cyougn06@naver.com>2022-01-31 22:57:57 +0900
commitb518d47800ced4dd0f0e0250090826b5f0bace44 (patch)
treef87af5b8c64bd2ec1898e264a3204eb9c5d67e5f /src/main/java/kr
parent5135d001b15890b76c5ad5d467e03a7e4ab324ea (diff)
downloadSkyblock-Dungeons-Guide-b518d47800ced4dd0f0e0250090826b5f0bace44.tar.gz
Skyblock-Dungeons-Guide-b518d47800ced4dd0f0e0250090826b5f0bace44.tar.bz2
Skyblock-Dungeons-Guide-b518d47800ced4dd0f0e0250090826b5f0bace44.zip
- Fix cursor turning into colored square when it has failed to load cursors from native lib
- Fix com.twelvemonkeys.imageio not being shaded properly
Diffstat (limited to 'src/main/java/kr')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/CursorReader.java5
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/GLCursors.java5
2 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/CursorReader.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/CursorReader.java
index 8a1a7950..11a9da51 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/CursorReader.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/CursorReader.java
@@ -21,6 +21,7 @@ package kr.syeyoung.dungeonsguide.utils.cursor;
import com.google.common.io.LittleEndianDataInputStream;
import com.google.common.io.LittleEndianDataOutputStream;
import com.twelvemonkeys.imageio.plugins.bmp.CURImageReader;
+import com.twelvemonkeys.imageio.plugins.bmp.CURImageReaderSpi;
import com.twelvemonkeys.imageio.plugins.bmp.ICOImageReader;
import lombok.Data;
@@ -35,6 +36,7 @@ import java.util.List;
public class CursorReader {
public static List<CursorData> readFromInputStream(InputStream inputStream) throws IOException {
+ System.out.println(inputStream);
LittleEndianDataInputStream dataInputStream = new LittleEndianDataInputStream(new BufferedInputStream(inputStream));
dataInputStream.mark(Integer.MAX_VALUE);
@@ -63,8 +65,7 @@ public class CursorReader {
dataInputStream.reset();
try (ImageInputStream imageInputStream = ImageIO.createImageInputStream(dataInputStream)) {
- Iterator<ImageReader> imageReaderIterator = ImageIO.getImageReaders(imageInputStream);
- CURImageReader imageReader = (CURImageReader) imageReaderIterator.next();
+ CURImageReader imageReader = new CURImageReader();
imageReader.setInput(imageInputStream);
for (int i = 0; i < directoryList.size(); i++) {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/GLCursors.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/GLCursors.java
index 832e3b0a..a3932955 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/GLCursors.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/cursor/GLCursors.java
@@ -73,11 +73,6 @@ public class GLCursors {
}
}
-
- static {
- setupCursors();
- }
-
public static void setupCursors() {
if (enumCursorCursorMap.size() != 0) return;
int platform = LWJGLUtil.getPlatform();