mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:49:56 +00:00
29 lines
537 B
C++
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
|