Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyDevice = errors.New("device has no gamepads")
View Source
var ErrInvalidViiperServer = errors.New("invalid VIIPER server")
View Source
var ErrNoDeviceForID = errors.New("no device found for given id")
View Source
var ErrUnsupportedViiperVersion = errors.New("unsupported VIIPER version")
View Source
var ErrVirtualAlreadyAssigned = errors.New("virtual gamepad already assigned to a real gamepad")
View Source
var ErrVirtualWithoutRealGamepad = errors.New("virtual gamepad without real gamepad")
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
RealGamepad *sdl.Gamepad
SteamVirtualGamepad *sdl.Gamepad
ViiperDevice *viiperdevice.Device
// contains filtered or unexported fields
}
func (*Device) SetViiperDevice ¶
func (d *Device) SetViiperDevice(vd *viiperdevice.Device)
type DeviceStore ¶
type DeviceStore interface {
OpenGamePad(id sdl.GamepadID) (*Device, error)
CloseGamePad(id sdl.GamepadID) error
DeviceForID(id sdl.GamepadID) (*Device, bool)
IgnoreNextDevice(num int)
Empty() bool
Devices() []*Device
}
func NewDeviceStore ¶
func NewDeviceStore(noSteamMode bool, gyroPassthrough bool) (DeviceStore, func(), error)
type ViiperBridge ¶
type ViiperBridge interface {
CreateDevice(ctx context.Context, gamepadID sdl.GamepadID, deviceType string) (chan *viiperdevice.Device, chan error)
IsCreateDeviceScheduled(gamepadID sdl.GamepadID) bool
Ping(ctx context.Context) (*viipertypes.PingResponse, error)
Info() *viipertypes.PingResponse
Ready() bool
ResolvedAddressAndPort() string
IsLoopbackAddress() bool
}
func NewViiperBridge ¶
func NewViiperBridge(ctx context.Context, dl DeviceStore, cfg *config.Viiper) ViiperBridge
Click to show internal directories.
Click to hide internal directories.