mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-27 12:55:20 -07:00
fix(controller): save remaps per profile, gate modals on enabled (#69)
This commit is contained in:
@@ -21,6 +21,7 @@ import type {
|
||||
import type {
|
||||
ControllerButtonIndicesConfig,
|
||||
ControllerConfig,
|
||||
ResolvedControllerProfileConfig,
|
||||
ControllerTriggerInputMode,
|
||||
Keybinding,
|
||||
ResolvedControllerBindingsConfig,
|
||||
@@ -164,6 +165,7 @@ export interface ResolvedConfig {
|
||||
repeatIntervalMs: number;
|
||||
buttonIndices: Required<ControllerButtonIndicesConfig>;
|
||||
bindings: Required<ResolvedControllerBindingsConfig>;
|
||||
profiles: Record<string, ResolvedControllerProfileConfig>;
|
||||
};
|
||||
ankiConnect: AnkiConnectConfig & {
|
||||
enabled: boolean;
|
||||
|
||||
@@ -227,6 +227,18 @@ export interface ControllerButtonIndicesConfig {
|
||||
rightTrigger?: number;
|
||||
}
|
||||
|
||||
export interface ControllerProfileConfig {
|
||||
label?: string;
|
||||
buttonIndices?: ControllerButtonIndicesConfig;
|
||||
bindings?: ControllerBindingsConfig;
|
||||
}
|
||||
|
||||
export interface ResolvedControllerProfileConfig {
|
||||
label: string;
|
||||
buttonIndices: Required<ControllerButtonIndicesConfig>;
|
||||
bindings: Required<ResolvedControllerBindingsConfig>;
|
||||
}
|
||||
|
||||
export interface ControllerConfig {
|
||||
enabled?: boolean;
|
||||
preferredGamepadId?: string;
|
||||
@@ -241,6 +253,7 @@ export interface ControllerConfig {
|
||||
repeatIntervalMs?: number;
|
||||
buttonIndices?: ControllerButtonIndicesConfig;
|
||||
bindings?: ControllerBindingsConfig;
|
||||
profiles?: Record<string, ControllerProfileConfig>;
|
||||
}
|
||||
|
||||
export interface ControllerPreferenceUpdate {
|
||||
|
||||
Reference in New Issue
Block a user