Platform/Unix/X11Keyboard: implement isKeyDown()
This commit is contained in:
parent
cdea7e238c
commit
6426679845
2 changed files with 137 additions and 2 deletions
|
|
@ -5,12 +5,14 @@
|
|||
#include <Spectre/System/Event.h>
|
||||
#include <Spectre/Input/Keyboard.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
class X11Keyboard : public Keyboard
|
||||
{
|
||||
public :
|
||||
virtual ~X11Keyboard() {}
|
||||
X11Keyboard();
|
||||
~X11Keyboard();
|
||||
|
||||
void init();
|
||||
|
||||
|
|
@ -22,6 +24,12 @@ public :
|
|||
protected :
|
||||
|
||||
virtual void update(InputModule *input);
|
||||
|
||||
private :
|
||||
::Display* m_disp;
|
||||
|
||||
// Cached keyboard state.
|
||||
char m_key_state[32];
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue