forked from SirDifferential/instrument_controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinputmanager.hpp
More file actions
37 lines (32 loc) · 795 Bytes
/
inputmanager.hpp
File metadata and controls
37 lines (32 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _INPUTMANAGER_HPP_
#define _INPUTMANAGER_HPP_
#include "synth_mapping.hpp"
#include <memory>
class Menu;
class Inputmanager
{
private:
int id;
// These flags are used to limit key presses on Linux
// Input is checked from multiple places, and on Linux
// this causes multiple presses of same key per frame
bool triggeredLeft;
bool triggeredRight;
bool triggeredUp;
bool triggeredDown;
bool triggeredA;
bool triggeredD;
bool triggeredZ;
bool triggeredX;
bool triggeredK;
std::shared_ptr<SynthMapping> synthMappings;
public:
Inputmanager();
~Inputmanager();
void resetKeys();
void checkInput();
void handleSynthEvents(unsigned char input_data[]);
int* getSynthKeysDown();
int* getSynthDownTimes();
};
#endif