VGamepad PC
The PC app for the virtual game controller.
Loading...
Searching...
No Matches
GamepadInjector Class Reference

Behaves like a virtual device (gamepad). More...

#include <gamepadSim.hpp>

Public Member Functions

 GamepadInjector ()
 ~GamepadInjector ()
 GamepadInjector (const GamepadInjector &)=delete
GamepadInjectoroperator= (const GamepadInjector &)=delete
 GamepadInjector (GamepadInjector &&)=delete
GamepadInjectoroperator= (GamepadInjector &&)=delete
void inject ()
 Injects the current gamepad state into the system.

Detailed Description

Behaves like a virtual device (gamepad).

Platform-specific implementations:

  • Windows: Uses the Windows UI Input Injection API (Preview) from WinRT
    • Requires Windows 10 or later
    • Requires Admin privileges (at least when running unpackaged)
  • Linux: Uses libevdev and uinput for gamepad simulation
    • Requires access to /dev/uinput
    • User must be in 'input' group or run as root

Not movable or copyable

Constructor & Destructor Documentation

◆ GamepadInjector() [1/3]

GamepadInjector::GamepadInjector ( )

◆ ~GamepadInjector()

GamepadInjector::~GamepadInjector ( )

◆ GamepadInjector() [2/3]

GamepadInjector::GamepadInjector ( const GamepadInjector & )
delete

◆ GamepadInjector() [3/3]

GamepadInjector::GamepadInjector ( GamepadInjector && )
delete

Member Function Documentation

◆ inject()

void GamepadInjector::inject ( )

Injects the current gamepad state into the system.

Note
This method sends the current gamepad state to the system for processing. None of the other methods will take effect until this method is called.

◆ operator=() [1/2]

GamepadInjector & GamepadInjector::operator= ( const GamepadInjector & )
delete

◆ operator=() [2/2]

GamepadInjector & GamepadInjector::operator= ( GamepadInjector && )
delete

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