Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect mouse cursor scaling, which breaks hover/tooltips/inventory #447

Open
wants to merge 1 commit into
base: multiloader/1.20.X
Choose a base branch
from

Conversation

michaeltyson
Copy link

The mouse cursor coordinate conversion was using “getScreenWidth()” rather than “getWidth()” (i.e. using the screen size, rather than the window size), which was resulting in an incorrect scaling factor. This fixes it, in all the places it’s used.

This should fix:

#440 - Inventory Items are far off screen to the right when selected
#425 - Inventory Movement Issues
#336 - Items and cursor turn invisible when trying to re-order items in inventory
#214 - MacOS Distortion [Unplayable] on ALL Mod Versions
#37 - Bug: Mouse icon moves to other Minecraft screen, or vanishes when in inventory

This issue is a show-stopper on macOS, and possibly on Windows with a Hi-DPI display, so I believe it’s quite high priority.

…entory

The mouse cursor coordinate conversion was using “getScreenWidth()” rather than “getWidth()” (i.e. using the screen size, rather than the window size), which was resulting in an incorrect scaling factor. This fixes it, in all the places it’s used.

This should fix:

MrCrayfish#440 - Inventory Items are far off screen to the right when selected
MrCrayfish#425 - Inventory Movement Issues
MrCrayfish#336 - Items and cursor turn invisible when trying to re-order items in inventory
MrCrayfish#214 - MacOS Distortion [Unplayable] on ALL Mod Versions
MrCrayfish#37 - Bug: Mouse icon moves to other Minecraft screen, or vanishes when in inventory

This issue is a show-stopper on macOS, and possibly on Windows with a Hi-DPI display, so I believe it’s quite high priority.
@michaeltyson
Copy link
Author

michaeltyson commented Sep 8, 2023

In case it's a while before this is merged (or isn't merged at all), here's a build with the fix:

https://d.atastypixel.com/1694149137/controllable-fabric-1.20.1-0.20.3-release.jar
https://d.atastypixel.com/1694295109/controllable-forge-1.20.1-0.20.3-release.jar

@PaneerPanda
Copy link

Hello, This issue is still persisting with me.
Im using the latest version of MacOS, with a PS5 controller.
I hope I'm not annoying anyone.
Thanks

@michaeltyson
Copy link
Author

michaeltyson commented Sep 16, 2023

Hello, This issue is still persisting with me.
Im using the latest version of MacOS, with a PS5 controller.
I hope I'm not annoying anyone.
Thanks

Oh that’s surprising! You’re definitely using the build from the links above?

Assuming so, some follow up questions: What specifically are you still seeing? Are we talking about a messed-up cursor position in the inventory screen? Are you on Forge or Fabric?

@PaneerPanda
Copy link

PaneerPanda commented Sep 17, 2023

Hello there, Um about the issue, I've started playing on the next day now and the issue seems to e resolved. Im sorry if I wasted anyone's time
Thank you

@michaeltyson
Copy link
Author

Yep, I just tried it here and it's working perfectly on Forge. @MrCrayfish, I think we're good to go

@NathanVss
Copy link

I can confirm that it works well on my side with this build :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants