mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-04 11:15:32 +00:00
Fixed for OpenMW compilation
This commit is contained in:
parent
5333b8e230
commit
0e30756ba1
3 changed files with 13 additions and 6 deletions
|
@ -34,10 +34,6 @@ struct Dispatcher : Mangle::Input::Event
|
||||||
if(!isBound(index))
|
if(!isBound(index))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Only treat key-down events for now
|
|
||||||
if(type != EV_KeyDown)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Get the mapped actions and execute them
|
// Get the mapped actions and execute them
|
||||||
const _O &list = map.getList(index);
|
const _O &list = map.getList(index);
|
||||||
_O::const_iterator it;
|
_O::const_iterator it;
|
||||||
|
@ -45,5 +41,10 @@ struct Dispatcher : Mangle::Input::Event
|
||||||
funcs.call(*it, p);
|
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<Dispatcher> DispatcherPtr;
|
||||||
|
|
||||||
}}
|
}}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,13 +21,17 @@ namespace Render
|
||||||
ExitListener(Ogre::RenderWindow *wnd)
|
ExitListener(Ogre::RenderWindow *wnd)
|
||||||
: window(wnd), exit(false) {}
|
: window(wnd), exit(false) {}
|
||||||
|
|
||||||
bool frameStarted(const FrameEvent &evt)
|
bool frameStarted(const Ogre::FrameEvent &evt)
|
||||||
{
|
{
|
||||||
if(window->isClosed())
|
if(window->isClosed())
|
||||||
exit = true;
|
exit = true;
|
||||||
|
|
||||||
return !exit;
|
return !exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function equivalent of setting exit=true. Handy when you need a
|
||||||
|
// delegate to bind to an event.
|
||||||
|
void exitNow() { exit = true; }
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Render
|
||||||
bool prot=true)
|
bool prot=true)
|
||||||
: camera(cam)
|
: camera(cam)
|
||||||
, sensX(sX)
|
, sensX(sX)
|
||||||
, sensY(sy)
|
, sensY(sY)
|
||||||
, flipProt(prot)
|
, flipProt(prot)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -50,5 +50,7 @@ namespace Render
|
||||||
|
|
||||||
void event(Type type, int index, const void *p);
|
void event(Type type, int index, const void *p);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef boost::shared_ptr<MouseLookEvent> MouseLookEventPtr;
|
||||||
}}
|
}}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue