1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:49:56 +00:00
openmw-tes3mp/libs/mangle/input/clients/ogre_input_capture.hpp
2012-03-11 18:13:59 +04:00

29 lines
537 B
C++

#ifndef MANGLE_INPUT_OGREINPUTFRAME_H
#define MANGLE_INPUT_OGREINPUTFRAME_H
/*
This Ogre FrameListener calls capture() on an input driver every frame.
*/
#include <OgreFrameListener.h>
#include "../driver.hpp"
namespace Mangle {
namespace Input {
struct OgreInputCapture : Ogre::FrameListener
{
Mangle::Input::Driver &driver;
OgreInputCapture(Mangle::Input::Driver &drv)
: driver(drv) {}
bool frameStarted(const Ogre::FrameEvent &evt)
{
driver.capture();
return true;
}
};
}}
#endif