Sunshine latest
Self-hosted game stream host for Moonlight.
input.h File Reference

Declarations for gamepad, keyboard, and mouse input handling. More...

#include <functional>
#include "platform/common.h"
#include "thread_safe.h"
Include dependency graph for input.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  input::touch_port_t
 

Functions

std::shared_ptr< input_tinput::alloc (safe::mail_t mail)
 
std::unique_ptr< platf::deinit_tinput::init ()
 
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)
 
bool input::probe_gamepads ()
 
void input::reset (std::shared_ptr< input_t > &input)
 
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.
 

Detailed Description

Declarations for gamepad, keyboard, and mouse input handling.

Function Documentation

◆ passthrough()

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.

Parameters
inputThe input context pointer.
input_dataThe input message.

◆ scale_client_contact_area()

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.

Parameters
valThe major and minor axis pair.
rotationThe rotation value from the touch/pen event.
scalarThe scalar cartesian coordinate pair.
Returns
The major and minor axis pair.