Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
virtualhid_gamepad.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "virtualhid_common.h"
8
9namespace platf::gamepad {
10 int alloc(input_raw_t *raw, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue);
11 void free(input_raw_t *raw, int index);
13 void release(input_raw_t *raw, int index);
15 void forget(const std::string &session_tag);
17 std::shared_ptr<lvh::Runtime> runtime_for(const std::string &session_tag);
18 void update(input_raw_t *raw, int index, const gamepad_state_t &state);
19 void touch(input_raw_t *raw, const gamepad_touch_t &touch);
20 void motion(input_raw_t *raw, const gamepad_motion_t &motion);
21 void battery(input_raw_t *raw, const gamepad_battery_t &battery);
25 bool prefer_input_events(lvh::GamepadProfileKind kind);
26 std::vector<supported_gamepad_t> &supported_gamepads(input_t *input);
27} // namespace platf::gamepad
Shared state for the Linux libvirtualhid input backend.
bool prefer_input_events(lvh::GamepadProfileKind kind)
Whether the configured Linux policy prefers an event-device gamepad.
bool supports_controller_extensions()
Whether the configured controller profile can expose motion or touchpad input.
std::shared_ptr< lvh::Runtime > runtime_for(const std::string &session_tag)
The libvirtualhid runtime for a detached desktop's gamepads, kept with them.
void release(input_raw_t *raw, int index)
Free a gamepad whose stream ended; a detached desktop keeps it.
void forget(const std::string &session_tag)
Close the gamepads kept for session_tag, and its runtime.