|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Declarations for gamepad, keyboard, and mouse input handling. More...
Go to the source code of this file.
Classes | |
| struct | input::touch_port_t |
| Touchscreen coordinate bounds used to scale absolute input. More... | |
Functions | |
| std::shared_ptr< input_t > | input::alloc (safe::mail_t mail) |
| Allocate and initialize platform input state for a stream. | |
| std::unique_ptr< platf::deinit_t > | input::init () |
| Initialize the platform input backend. | |
| void | input::passthrough (std::shared_ptr< input_t > &input, std::vector< std::uint8_t > &&input_data) |
| Called on the control stream thread to queue an input message. | |
| void | input::print (void *payload) |
| Write a debug log representation of the input packet. | |
| bool | input::probe_gamepads () |
| Probe connected gamepads and update input capability state. | |
| void | input::reset (std::shared_ptr< input_t > &input) |
| Reset the object to its initial empty state. | |
| std::pair< float, float > | input::scale_client_contact_area (const std::pair< float, float > &val, uint16_t rotation, const std::pair< float, float > &scalar) |
| Scale the ellipse axes according to the provided size. | |
Declarations for gamepad, keyboard, and mouse input handling.
| std::shared_ptr< input_t > input::alloc | ( | safe::mail_t | ) |
Allocate and initialize platform input state for a stream.
| Mailbox used to exchange messages with worker threads. |
|
nodiscard |
Initialize the platform input backend.
Initialize global input resources and platform backends.
| void input::passthrough | ( | std::shared_ptr< input_t > & | input, |
| std::vector< std::uint8_t > && | input_data ) |
Called on the control stream thread to queue an input message.
Queue a raw input message for platform passthrough.
| input | The input context pointer. |
| input_data | The input message. |
| void input::print | ( | void * | input | ) |
Write a debug log representation of the input packet.
| input | Raw input packet to format for logging. |
| bool input::probe_gamepads | ( | ) |
Probe connected gamepads and update input capability state.
Probe whether the platform can create virtual gamepads.
| void input::reset | ( | std::shared_ptr< input_t > & | input | ) |
Reset the object to its initial empty state.
Reset stream input state after a client disconnect or shutdown.
| input | Shared stream input state to reset. |
| std::pair< float, float > input::scale_client_contact_area | ( | const std::pair< float, float > & | val, |
| uint16_t | rotation, | ||
| const std::pair< float, float > & | scalar ) |
Scale the ellipse axes according to the provided size.
| val | The major and minor axis pair. |
| rotation | The rotation value from the touch/pen event. |
| scalar | The scalar cartesian coordinate pair. |