libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::GlobalSDLDeviceSettings Class Reference

Global threshold settings for SDL gamepad analog axes. More...

#include <GlobalSDLDeviceSettings.h>

Public Member Functions

 GlobalSDLDeviceSettings (std::shared_ptr< ConsoleVariable > consoleVariable)
 Constructs the settings and loads persisted values from configuration.
 
 ~GlobalSDLDeviceSettings ()
 
int32_t GetStickAxisThresholdPercentage ()
 Returns the stick axis dead-zone threshold as a percentage (0–100).
 
void SetStickAxisThresholdPercentage (int32_t stickAxisThresholdPercentage)
 Sets the stick axis dead-zone threshold percentage.
 
int32_t GetTriggerAxisThresholdPercentage ()
 Returns the trigger axis dead-zone threshold as a percentage (0–100).
 
void SetTriggerAxisThresholdPercentage (int32_t triggerAxisThresholdPercentage)
 Sets the trigger axis dead-zone threshold percentage.
 
void SaveToConfig ()
 Persists the current threshold values to the Config subsystem.
 
void EraseFromConfig ()
 Removes the persisted threshold values from the Config subsystem.
 

Detailed Description

Global threshold settings for SDL gamepad analog axes.

GlobalSDLDeviceSettings stores stick and trigger dead-zone threshold percentages that apply to all SDL game controllers. The values are persisted through the Config subsystem.

Constructor & Destructor Documentation

◆ GlobalSDLDeviceSettings()

Ship::GlobalSDLDeviceSettings::GlobalSDLDeviceSettings ( std::shared_ptr< ConsoleVariable consoleVariable)

Constructs the settings and loads persisted values from configuration.

◆ ~GlobalSDLDeviceSettings()

Ship::GlobalSDLDeviceSettings::~GlobalSDLDeviceSettings ( )

Member Function Documentation

◆ EraseFromConfig()

void Ship::GlobalSDLDeviceSettings::EraseFromConfig ( )

Removes the persisted threshold values from the Config subsystem.

◆ GetStickAxisThresholdPercentage()

int32_t Ship::GlobalSDLDeviceSettings::GetStickAxisThresholdPercentage ( )

Returns the stick axis dead-zone threshold as a percentage (0–100).

Returns
Current stick axis threshold percentage.

◆ GetTriggerAxisThresholdPercentage()

int32_t Ship::GlobalSDLDeviceSettings::GetTriggerAxisThresholdPercentage ( )

Returns the trigger axis dead-zone threshold as a percentage (0–100).

Returns
Current trigger axis threshold percentage.

◆ SaveToConfig()

void Ship::GlobalSDLDeviceSettings::SaveToConfig ( )

Persists the current threshold values to the Config subsystem.

◆ SetStickAxisThresholdPercentage()

void Ship::GlobalSDLDeviceSettings::SetStickAxisThresholdPercentage ( int32_t  stickAxisThresholdPercentage)

Sets the stick axis dead-zone threshold percentage.

Parameters
stickAxisThresholdPercentageNew threshold value (0–100).

◆ SetTriggerAxisThresholdPercentage()

void Ship::GlobalSDLDeviceSettings::SetTriggerAxisThresholdPercentage ( int32_t  triggerAxisThresholdPercentage)

Sets the trigger axis dead-zone threshold percentage.

Parameters
triggerAxisThresholdPercentageNew threshold value (0–100).

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