ThemableWidgetLibrary / twl-lwjgl3

Themable Widget Library extension for LWJGL 3
1 stars 2 forks source link

LWJGLInput mouse wheel handling broken with high precision touchpad #1

Open Barteks2x opened 7 years ago

Barteks2x commented 7 years ago

This code assumes that the mouse wheel changes in constant increments of integer values:

                if(input.wheel != 0.0D) {
                    gui.handleMouseWheel((int)input.wheel);
                }

                input.wheel = 0.0D;

But with high precision touchpad when scrolling slowly, the value changes by tiny amounts, and casting it to int makes the value change by zero. So small increments are completely discarded.

Barteks2x commented 7 years ago

Actually, looks like this issue also exists in lwjgl2 version - scrolling doesn't work correctly even in TWL theme editor.