aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaykam821 <24855774+haykam821@users.noreply.github.com>2021-08-18 11:13:00 -0400
committerGitHub <noreply@github.com>2021-08-18 18:13:00 +0300
commitdbdbb9d1cf5c7484abd7aabb41695f6607c954b3 (patch)
tree6bed03db8c93f36d51dd4326e2b4bfd4a5160346
parentbaf993e6d3f9fe560eafa27718c33d8c2bedce10 (diff)
downloadLibGui-dbdbb9d1cf5c7484abd7aabb41695f6607c954b3.tar.gz
LibGui-dbdbb9d1cf5c7484abd7aabb41695f6607c954b3.tar.bz2
LibGui-dbdbb9d1cf5c7484abd7aabb41695f6607c954b3.zip
Fix the bottom coordinate of scissor rectangles being incorrect on high DPI displays (#134)
Fixes #114
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java b/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java
index e7c7e72..5e29d34 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/Scissors.java
@@ -81,7 +81,7 @@ public final class Scissors {
}
}
- int windowHeight = mc.getWindow().getHeight();
+ int windowHeight = mc.getWindow().getFramebufferHeight();
double scale = mc.getWindow().getScaleFactor();
int scaledWidth = (int) (width * scale);
int scaledHeight = (int) (height * scale);