Page 1 of 1

OIS exception on createInputObject(OIS::OISKeyboard, true)

Posted: Wed Jan 19, 2011 13:39
by ___MoonDance
hello,everyone,I got an error on createInputObject(OIS::OISKeyboard, true).
OGRE 1.60,CEGUI 0.75
m_pKeyboard = static_cast<OIS::Keyboard*>(m_pInputeMgr->createInputObject(OIS::OISKeyboard, true));
I don't know why. :? Thanks for your help!
PS:I don't have the OIS src.

Code: Select all

void GuiContrl::_initOIS(unsigned long hFrameWnd)
{
   OIS::ParamList paramList;
   paramList.insert(std::make_pair(std::string("WINDOW"), Ogre::StringConverter::toString(hFrameWnd)));
   paramList.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_FOREGROUND" )));
   paramList.insert(std::make_pair(std::string("w32_mouse"), std::string("DISCL_NONEXCLUSIVE")));
   paramList.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_FOREGROUND")));
   paramList.insert(std::make_pair(std::string("w32_keyboard"), std::string("DISCL_NONEXCLUSIVE")));
   m_pInputeMgr = OIS::InputManager::createInputSystem(paramList);
   m_pKeyboard = static_cast<OIS::Keyboard*>(m_pInputeMgr->createInputObject(OIS::OISKeyboard, true));
   m_pMouse = static_cast<OIS::Mouse*>(m_pInputeMgr->createInputObject(OIS::OISMouse, true));

   windowResized(m_pOgreRender->m_pRenderWindow);

   m_pKeyboard->setEventCallback(this);
   m_pMouse->setEventCallback(this);

   Ogre::WindowEventUtilities::addWindowEventListener(m_pOgreRender->m_pRenderWindow, this);
   m_pOgreRender->m_pRoot->addFrameListener(this);
}

Re: OIS exception on createInputObject(OIS::OISKeyboard, true)

Posted: Wed Jan 19, 2011 13:49
by Kulik
Please ask in the OIS forum. And catch and examine the exception before you post there!