Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3045 Members - Latest Member: lensreslai

10. February 2012, 05:59:22 AM
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)JAGaToo's new InputSystem is ready!
Pages: 1 2 [3]
Print
Author Topic: JAGaToo's new InputSystem is ready!  (Read 7893 times)
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #30 on: 16. July 2008, 02:45:43 PM »

I have no idea for the mouse wheel thing. It may also be related to SWT threading. But this is just a raw guess.

This bug also shows itself in JOGL_AWT.

To recreate in the test launcher (I'm using the head of Jagatoo/Xith3D):
JOGL_AWT
800x600x16x59
Fullscreen off
V-Sync on
FSAA: OFF
Mouse-Y inverted off

FirstPersonInputHandlerTest

If you scroll a lot it'll zoom a little bit.  I just discovered this and plan on looking into what's different in LWJGL.

Let me preface this with, I have no idea if this is the correct fix.  I just looked at the LWJGLMouse, saw a difference, and copied it to the AWTMouse and it fixed the issue with the scroll wheel.

Code:
private void processMouseEvent( java.awt.event.MouseWheelEvent _e )
    {
        if ( !isEnabled() )
            return;
       
        java.awt.event.MouseWheelEvent __e = (java.awt.event.MouseWheelEvent)_e;
        final boolean isPageMove = __e.getScrollType() == java.awt.event.MouseWheelEvent.WHEEL_BLOCK_SCROLL;
       
        InputSystem.getInstance().notifyInputStatesManagers( this, getWheel(), getWheel().getIntValue(), -__e.getWheelRotation(), lastKnownNanoTime );
       
        MouseWheelEvent e = MouseEventPool.allocWheel( this, getWheel(), -__e.getWheelRotation(), isPageMove, lastKnownNanoTime, 0L );
       
        if ( e != null )
            getEventQueue().enqueue( e );
    }

I added the InputSystem.getInstace() line in the middle there.  Does that seem like it would be the correct fix for the issue?
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #31 on: 16. July 2008, 03:58:05 PM »

I found the bug. It is due to the EventQueue not correctly used in combination with Keyboard and Mouse. I will fix that now.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #32 on: 16. July 2008, 03:59:54 PM »

I added the InputSystem.getInstace() line in the middle there.  Does that seem like it would be the correct fix for the issue?

No. That's not correct. It updates the states-manager from the AWT event thread, which must not be done.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #33 on: 16. July 2008, 04:50:14 PM »

I have fixed it. Unfortunately I cannot commit it atm., because of sourceforge doesn't let me. I have attached a zip archive with the changed files. Please commit them, if you can, or I will do it, when sourceforge has fixed the server protocol.

Marvin
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #34 on: 16. July 2008, 05:08:30 PM »

Thanks, I'll to it when I get home if it's not already done
Logged

Pages: 1 2 [3]
Print
Jump to:  

Theme orange-lt created by panic