2019-12-03 19:23:33 +00:00
|
|
|
//
|
|
|
|
// Created by loki on 6/20/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SUNSHINE_INPUT_H
|
|
|
|
#define SUNSHINE_INPUT_H
|
|
|
|
|
2019-12-08 17:55:58 +00:00
|
|
|
#include "platform/common.h"
|
2019-12-22 22:34:12 +00:00
|
|
|
#include "thread_pool.h"
|
2019-12-03 19:23:33 +00:00
|
|
|
|
|
|
|
namespace input {
|
2019-12-22 20:24:50 +00:00
|
|
|
struct gamepad_state_t {
|
|
|
|
std::uint16_t buttonFlags;
|
|
|
|
std::uint8_t lt;
|
|
|
|
std::uint8_t rt;
|
|
|
|
std::int16_t lsX;
|
|
|
|
std::int16_t lsY;
|
|
|
|
std::int16_t rsX;
|
|
|
|
std::int16_t rsY;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct input_t {
|
|
|
|
input_t();
|
2019-12-03 19:23:33 +00:00
|
|
|
|
2019-12-22 20:24:50 +00:00
|
|
|
gamepad_state_t gamepad_state;
|
2019-12-22 22:34:12 +00:00
|
|
|
util::ThreadPool::task_id_t back_timeout_id;
|
|
|
|
|
2019-12-22 20:24:50 +00:00
|
|
|
platf::input_t input;
|
|
|
|
};
|
|
|
|
|
|
|
|
void print(void *input);
|
2019-12-22 22:34:12 +00:00
|
|
|
void passthrough(std::shared_ptr<input_t> &input, std::vector<std::uint8_t> &&input_data);
|
2019-12-03 19:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SUNSHINE_INPUT_H
|