-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinputsteam.h
More file actions
49 lines (38 loc) · 1.44 KB
/
Copy pathinputsteam.h
File metadata and controls
49 lines (38 loc) · 1.44 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
Copyright 2017, Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
This file is part of inputmap.
inputmap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
inputmap is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with inputmap. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INPUTSTEAM_H_INCLUDED
#define INPUTSTEAM_H_INCLUDED
#include "inifile.h"
#include "inputdev.h"
#include "steam/steamcontroller.h"
class InputDeviceSteam : public InputDevice
{
public:
explicit InputDeviceSteam(const IniSection &ini);
virtual int fd()
{ return m_steam.fd(); }
virtual ValueId parse_value(const std::string &name);
virtual PollResult on_poll(int event);
virtual value_t get_value(const ValueId &id);
virtual int ff_upload(const ff_effect &eff);
virtual int ff_erase(int id);
virtual void ff_run(int eff, bool on);
virtual void flush();
private:
SteamController m_steam;
bool m_accel_enabled = false;
bool m_auto_haptic_left, m_auto_haptic_right;
};
#endif /* INPUTSTEAM_H_INCLUDED */