I have a problem recieving keyboard and mouse updates from OIS on my Mac OSX build. I'm using the same source code as on my Windows machine (where everything works), and everything compiles and runs. I have set breakpoints in OIS::Keyboard::capture() and it hits, but still I don't receive anything to the mouseMoved() callback functions.
Also another thing, if I Cmd+Tab away rom my render window and can't tab it back, instead I have to focus it back from Mission Control ... Maybe it's something with the window management as well? (Using Ogres auto created window here...)
Using:
OSX 10.8
Ogre 1.9
64-bit build
Cocoa
Code: Select all
OIS::ParamList pl;
size_t winHnd = 0;
std::stringstream strWinHnd;
win->getCustomAttribute("WINDOW", &winHnd);
strWinHnd << winHnd;
pl.insert(std::make_pair(std::string("WINDOW"), strWinHnd.str()));
mMgr = OIS::InputManager::createInputSystem(pl);
// create input devices
// (buffered)
mMouse = createMouse(true);
mKeyboard = createKeyboard(true);
// set callback
mMouse->setEventCallback(this);
mKeyboard->setEventCallback(this);
int mWidth = win->getWidth();
int mHeight = win->getHeight();
const OIS::MouseState &ms = mMouse->getMouseState();
ms.width = (int)mWidth;
Code: Select all
Ogre::WindowEventUtilities::messagePump();
inputMgr->captureInput();