OSX suggestion by corristo

This commit is contained in:
scrawl 2012-08-12 21:25:13 +02:00
parent 86d6f190bf
commit 90f1d9c2f2

View file

@ -1,5 +1,9 @@
#include "inputmanagerimp.hpp"
#if defined(__APPLE__) && !defined(__LP64__)
#include <Carbon/Carbon.h>
#endif
#include <OgreRoot.h>
#include <OgreRenderWindow.h>
@ -76,12 +80,12 @@ namespace MWInput
#endif
}
#ifdef __APPLE_CC__
#if defined(__APPLE__) && !defined(__LP64__)
// Give the application window focus to receive input events
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
SetFrontProcess(&psn);
#endif
#endif
mInputManager = OIS::InputManager::createInputSystem( pl );