I'm making some progress porting my game to eihort, but switching input systems is causing some stress.
Here is what I have now:
InputManager::InputManager(Ogre::RenderWindow* window)
{
OIS::ParamList pl;
pl.insert(OIS::ParamList::value_type("WINDOW", window->getName()));
//////Fails here/////
inputManager = OIS::InputManager::createInputSystem( pl );
//////Fails here/////
mouse = static_cast<OIS::Mouse*>(inputManager->createInputObject( OIS::OISMouse, true ));
keyboard = static_cast<OIS::Keyboard*>(inputManager->createInputObject( OIS::OISKeyboard, true));
const OIS::MouseState &ms = mouse->getMouseState();
ms.width = window->getWidth();
ms.height = window->getHeight();
}
My input handling class was named Inputmanager before I started porting and haven't yet had a chance to change it.
I have checked the window's name and it does in fact exist.
I create it here:
bool GameManager::configure(void)
{
if (!mRoot->showConfigDialog()) // show config dialog.
{
return false;
}
mRenderWindow = mRoot->initialise(true); // initialise and create a default rendering window
mInputManager = new InputManager(mRenderWindow);
mInputManager->getMouse()->setEventCallback(this);
mInputManager->getKeyboard()->setEventCallback(this);
WindowEventUtilities::addWindowEventListener(mRenderWindow, this);
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
return true;
}
Don't know if this would make a difference, but my GameManager class is derived from FrameListener, WindowsEventListener, and the OIS mouse and key listeners.
The code is a mix of basic tutorial 5 and the practical application code so I may have mixed something up.