Sunshine/sunshine/input.h
loki-47-6F-64 ee067f4d8a
Merge pull request #6 from cgutman/input_fixes
Add support for X1/X2 mouse buttons and Super keys
2020-01-19 11:46:10 +01:00

30 lines
588 B
C++

//
// Created by loki on 6/20/19.
//
#ifndef SUNSHINE_INPUT_H
#define SUNSHINE_INPUT_H
#include "platform/common.h"
#include "thread_pool.h"
namespace input {
struct input_t {
input_t();
platf::gamepad_state_t gamepad_state;
std::unordered_map<short, bool> key_press;
std::array<std::uint8_t, 5> mouse_press;
util::ThreadPool::task_id_t back_timeout_id;
platf::input_t input;
};
void print(void *input);
void passthrough(std::shared_ptr<input_t> &input, std::vector<std::uint8_t> &&input_data);
void reset(std::shared_ptr<input_t> &input);
}
#endif //SUNSHINE_INPUT_H