dualsense-ts
Version:
The natural interface for your DualSense and DualSense Access controllers, with Typescript
56 lines • 2.33 kB
TypeScript
/** Options for bulk-setting power save subsystem states */
export interface PowerSaveOptions {
/** Enable or disable touch processing (default: enabled) */
touch?: boolean;
/** Enable or disable motion sensor (IMU) processing (default: enabled) */
motion?: boolean;
/** Enable or disable the haptic processor (default: enabled) */
haptics?: boolean;
/** Enable or disable the audio processor (default: enabled) */
audio?: boolean;
/** Mute or unmute haptic output without disabling the processor (default: unmuted) */
muteHaptics?: boolean;
}
/**
* Controls per-subsystem power save flags on the DualSense controller.
*
* Disabling a subsystem tells the controller to stop processing that input
* or output entirely, conserving battery. This is distinct from the
* per-channel audio mutes on {@link Audio}, which silence individual
* outputs without powering down the processor.
*
* All subsystems are enabled by default.
*/
export declare class PowerSaveControl {
/** Bitfield of active PowerSave disable/mute flags */
private _mask;
/** Whether touch processing is enabled */
get touch(): boolean;
/** Enable or disable touch processing */
set touch(enabled: boolean);
/** Whether motion sensor (IMU) processing is enabled */
get motion(): boolean;
/** Enable or disable motion sensor processing */
set motion(enabled: boolean);
/** Whether the haptic processor is enabled */
get haptics(): boolean;
/** Enable or disable the haptic processor */
set haptics(enabled: boolean);
/** Whether the audio processor is enabled */
get audio(): boolean;
/** Enable or disable the audio processor */
set audio(enabled: boolean);
/** Whether haptic output is muted (processor still runs) */
get hapticsMuted(): boolean;
/** Mute or unmute haptic output without disabling the processor */
set hapticsMuted(muted: boolean);
/** Set multiple subsystem states at once */
set(options: PowerSaveOptions): void;
/** Reset all subsystems to their default (enabled/unmuted) state */
reset(): void;
/** Raw power save flags byte for the output loop */
get flags(): number;
/** Change-detection key for the output loop */
toKey(): string;
}
//# sourceMappingURL=power_save.d.ts.map