[SOLVED]MyGUI doesn't like injectMouseMove


18-02-2010 11:57:51

Hey guys, I'm trying to get the latest MyGUI running under Sidux (Debian SID).

It works fine until I try to make MyGUI recognize the mouse movement...

Gui successfully initialized | /home/andre/my-gui/MyGUIEngine/src/MyGUI_Gui.cpp | 129

Program received signal SIGSEGV, Segmentation fault.
0xb788c3da in MyGUI::Gui::injectMouseMove (this=0x656d616e, _absx=0, _absy=0, _absz=0) at /home/andre/my-gui/MyGUIEngine/src/MyGUI_Gui.cpp:183
183 bool Gui::injectMouseMove( int _absx, int _absy, int _absz) { return mInputManager->injectMouseMove(_absx, _absy, _absz); }

I used the setup from the wiki...

class InputManager : public OIS::KeyListener,
public OIS::MouseListener,
public OIS::JoyStickListener,
public GDKEngine::System { //<----- the class that initializes MyGUI
bool mouseMoved(const OIS::MouseEvent &evt) {

From the GDKEngine::System class:

MyGUI::OgrePlatform *mGUIPlatform;
MyGUI::Gui *mGUI;
void setupGUI() {
mGUIPlatform = new MyGUI::OgrePlatform();
mGUI = new MyGUI::Gui();

setupGUI() is called before adding the FrameListener.

When I don't call mGUI->injectMouseMove it works just fine.

Edit: any other of the inject function makes the program crash aswell.


18-02-2010 13:34:20

Solved it by changing the class from
InputManager(Ogre::RenderWindow *renderWindow,GDKEngine::InputManager *inputClass=NULL) {
InputManager(Ogre::RenderWindow *renderWindow,MyGUI::Gui *gui,GDKEngine::InputManager *inputClass=NULL) {

Strange, but it works this way.