mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-23 22:23:52 +00:00
30 lines
526 B
C++
30 lines
526 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;
|
||
|
|
||
|
ExitListener(Mangle::Input::Driver &drv)
|
||
|
: driver(drv) {}
|
||
|
|
||
|
bool frameStarted(const FrameEvent &evt)
|
||
|
{
|
||
|
driver.capture();
|
||
|
return true;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|