Skip to content

Commit 39d2db6

Browse files
committed
Fix mouse pos during overlay rendering
Creation of the `Draw` object has been moved in 8040112 but the mouse position needs to be reset before that is created, otherwise it'll use the fake mouse pos.
1 parent 2f5600a commit 39d2db6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/gg/essential/ad/modal/ModalManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ private void handleDraw(
8686
//$$ MatrixStack stack
8787
//#endif
8888
) {
89+
resetMousePosition();
90+
8991
Draw draw = new Draw(
9092
(int) UMouse.getScaledX(),
9193
(int) UMouse.getScaledY()
@@ -101,8 +103,6 @@ private void handleDraw(
101103
private void handleDraw(Draw draw) {
102104
if (currentModal == null) return;
103105

104-
resetMousePosition();
105-
106106
int width = UResolution.getScaledWidth();
107107
int height = UResolution.getScaledHeight();
108108

0 commit comments

Comments
 (0)