mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 15:00:18 -04:00
Added ogre input capturer
This commit is contained in:
parent
18dc065715
commit
9f21081c13
29
input/clients/ogre_input_capture.hpp
Normal file
29
input/clients/ogre_input_capture.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#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
|
Loading…
x
Reference in New Issue
Block a user