Sunshine latest
Self-hosted game stream host for Moonlight.
platf::vigem_t Class Reference
Collaboration diagram for platf::vigem_t:
[legend]

Public Member Functions

int alloc_gamepad_internal (const gamepad_id_t &id, feedback_queue_t &feedback_queue, VIGEM_TARGET_TYPE gp_type)
 Attaches a new gamepad.
 
void free_target (int nr)
 Detaches the specified gamepad.
 
int init ()
 
void rumble (target_t::pointer target, std::uint8_t largeMotor, std::uint8_t smallMotor)
 Pass rumble data back to the client.
 
void set_rgb_led (target_t::pointer target, std::uint8_t r, std::uint8_t g, std::uint8_t b)
 Pass RGB LED data back to the client.
 
 ~vigem_t ()
 vigem_t destructor.
 

Public Attributes

client_t client
 
std::vector< gamepad_context_tgamepads
 

Member Function Documentation

◆ alloc_gamepad_internal()

int platf::vigem_t::alloc_gamepad_internal ( const gamepad_id_t & id,
feedback_queue_t & feedback_queue,
VIGEM_TARGET_TYPE gp_type )
inline

Attaches a new gamepad.

Parameters
idThe gamepad ID.
feedback_queueThe queue for posting messages back to the client.
gp_typeThe type of gamepad.
Returns
0 on success.

◆ free_target()

void platf::vigem_t::free_target ( int nr)
inline

Detaches the specified gamepad.

Parameters
nrThe gamepad.

◆ rumble()

void platf::vigem_t::rumble ( target_t::pointer target,
std::uint8_t largeMotor,
std::uint8_t smallMotor )
inline

Pass rumble data back to the client.

Parameters
targetThe gamepad.
largeMotorThe large motor.
smallMotorThe small motor.

◆ set_rgb_led()

void platf::vigem_t::set_rgb_led ( target_t::pointer target,
std::uint8_t r,
std::uint8_t g,
std::uint8_t b )
inline

Pass RGB LED data back to the client.

Parameters
targetThe gamepad.
rThe red channel.
gThe red channel.
bThe red channel.

The documentation for this class was generated from the following file: