Sunshine master
Self-hosted game stream host for Moonlight.
inputtino_gamepad.h
Go to the documentation of this file.
1
5#pragma once
6
7// lib includes
8#include <boost/locale.hpp>
9#include <inputtino/input.hpp>
10#include <libevdev/libevdev.h>
11
12// local includes
13#include "inputtino_common.h"
14#include "src/platform/common.h"
15
16using namespace std::literals;
17
18namespace platf::gamepad {
19
28
38 int alloc(input_raw_t *raw, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue);
39
46 void free(input_raw_t *raw, int nr);
47
55 void update(input_raw_t *raw, int nr, const gamepad_state_t &gamepad_state);
56
63 void touch(input_raw_t *raw, const gamepad_touch_t &touch);
64
71 void motion(input_raw_t *raw, const gamepad_motion_t &motion);
72
79 void battery(input_raw_t *raw, const gamepad_battery_t &battery);
80
87 std::vector<supported_gamepad_t> &supported_gamepads(input_t *input);
88} // namespace platf::gamepad
Unique pointer wrapper with customizable pointer and deleter types.
Definition utility.h:820
Declarations for common platform specific utilities.
std::vector< supported_gamepad_t > & supported_gamepads(input_t *input)
Gets the supported gamepads for this platform backend.
Definition inputtino.cpp:160
safe::mail_raw_t::queue_t< gamepad_feedback_msg_t > feedback_queue_t
Queue used to deliver controller feedback commands to the platform backend.
Definition common.h:249
Declarations for inputtino common input handling.
ControllerType
Enumerates supported controller type options.
Definition inputtino_gamepad.h:23
@ XboxOneWired
Xbox One Wired Controller.
Definition inputtino_gamepad.h:24
@ DualSenseWired
DualSense Wired Controller.
Definition inputtino_gamepad.h:25
@ SwitchProWired
Switch Pro Wired Controller.
Definition inputtino_gamepad.h:26
Capabilities reported when a controller is connected.
Definition common.h:417
Battery state reported by a virtual gamepad.
Definition common.h:452
Global and client-relative identifiers for a virtual gamepad.
Definition common.h:403
Accelerometer or gyroscope sample from a controller.
Definition common.h:438
Button and axis state received for a virtual gamepad.
Definition common.h:390
Touchpad contact data reported by a controller.
Definition common.h:426
Global inputtino device handles shared by clients.
Definition input.cpp:506