diff --git a/input/dispatcher.hpp b/input/dispatcher.hpp index bba13893d3..930195856a 100644 --- a/input/dispatcher.hpp +++ b/input/dispatcher.hpp @@ -34,10 +34,6 @@ struct Dispatcher : Mangle::Input::Event if(!isBound(index)) return; - // Only treat key-down events for now - if(type != EV_KeyDown) - return; - // Get the mapped actions and execute them const _O &list = map.getList(index); _O::const_iterator it; @@ -45,5 +41,10 @@ struct Dispatcher : Mangle::Input::Event funcs.call(*it, p); } }; + +// This helps us play nice with Mangle's EventPtr, but it should +// really be defined for all the classes in OEngine. + typedef boost::shared_ptr DispatcherPtr; + }} #endif diff --git a/ogre/exitlistener.hpp b/ogre/exitlistener.hpp index ed07ee55c8..5a9d1ff68f 100644 --- a/ogre/exitlistener.hpp +++ b/ogre/exitlistener.hpp @@ -21,13 +21,17 @@ namespace Render ExitListener(Ogre::RenderWindow *wnd) : window(wnd), exit(false) {} - bool frameStarted(const FrameEvent &evt) + bool frameStarted(const Ogre::FrameEvent &evt) { if(window->isClosed()) exit = true; return !exit; } + + // Function equivalent of setting exit=true. Handy when you need a + // delegate to bind to an event. + void exitNow() { exit = true; } }; }} #endif diff --git a/ogre/mouselook.hpp b/ogre/mouselook.hpp index b5c7849452..6e09ff4a10 100644 --- a/ogre/mouselook.hpp +++ b/ogre/mouselook.hpp @@ -38,7 +38,7 @@ namespace Render bool prot=true) : camera(cam) , sensX(sX) - , sensY(sy) + , sensY(sY) , flipProt(prot) {} @@ -50,5 +50,7 @@ namespace Render void event(Type type, int index, const void *p); }; + + typedef boost::shared_ptr MouseLookEventPtr; }} #endif