Code: Select all
mEventProcessor = new EventProcessor();
mEventProcessor->initialise(win);
mEventProcessor->startProcessingEvents();
mEventProcessor->addKeyListener(this);
mEventProcessor->addMouseListener (this);
mEventProcessor->addMouseMotionListener (this);
mInputDevice = mEventProcessor->getInputReader();
When I create the inputReader directly, like it is done in ExampleFrameListener.h in the second case
Code: Select all
mInputDevice = PlatformManager::getSingleton().createInputReader();
mInputDevice->initialise(win, true, true);
Did I forget to initialize something for using mInputDevice->getMouseButton() with an InputReader got from an EventProcessor? It pretty much looks like an initialization problem for me, like the memory is filled with random values !=0 and thus the memory holding the mousebutton state holds a value that corresponds to true even though the button is not pressed. But this is just a guess.