mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
Controller: subtitle line actions, Button Style, keyboard-only mode pause, Alt+C fixes (#316)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
6d0f37ac21
commit
b99409bbcd
60 files changed
+1900
-219
No files matched your search
+26
-2
@@ -176,8 +176,11 @@ export type ControllerButtonBinding =
|
||||
|
||||
export type ControllerAxisBinding = 'leftStickX' | 'leftStickY' | 'rightStickX' | 'rightStickY';
|
||||
export type ControllerTriggerInputMode = 'auto' | 'digital' | 'analog';
|
||||
/** Letters printed on the face buttons: Xbox-style (A at the bottom) or Nintendo-style (A on the right). */
|
||||
export type ControllerFaceButtonLabels = 'xbox' | 'nintendo';
|
||||
/**
|
||||
* Face button style: Xbox (A at the bottom), Nintendo (A on the right) or PlayStation
|
||||
* (╳ at the bottom, laid out like Xbox). Decides button names and where letters land.
|
||||
*/
|
||||
export type ControllerFaceButtonLabels = 'xbox' | 'nintendo' | 'playstation';
|
||||
export type ControllerAxisDirection = 'negative' | 'positive';
|
||||
export type ControllerDpadFallback = 'none' | 'horizontal' | 'vertical';
|
||||
|
||||
@@ -239,6 +242,10 @@ export interface ControllerBindingsConfig {
|
||||
holdSecondarySub?: ControllerDiscreteBindingConfig;
|
||||
previousEntry?: ControllerDiscreteBindingConfig;
|
||||
nextEntry?: ControllerDiscreteBindingConfig;
|
||||
previousSubtitle?: ControllerDiscreteBindingConfig;
|
||||
nextSubtitle?: ControllerDiscreteBindingConfig;
|
||||
replaySubtitle?: ControllerDiscreteBindingConfig;
|
||||
playNextSubtitle?: ControllerDiscreteBindingConfig;
|
||||
leftStickHorizontal?: ControllerAxisBindingConfig;
|
||||
leftStickVertical?: ControllerAxisBindingConfig;
|
||||
rightStickHorizontal?: ControllerAxisBindingConfig;
|
||||
@@ -258,6 +265,10 @@ export interface ResolvedControllerBindingsConfig {
|
||||
holdSecondarySub?: ResolvedControllerDiscreteBinding;
|
||||
previousEntry?: ResolvedControllerDiscreteBinding;
|
||||
nextEntry?: ResolvedControllerDiscreteBinding;
|
||||
previousSubtitle?: ResolvedControllerDiscreteBinding;
|
||||
nextSubtitle?: ResolvedControllerDiscreteBinding;
|
||||
replaySubtitle?: ResolvedControllerDiscreteBinding;
|
||||
playNextSubtitle?: ResolvedControllerDiscreteBinding;
|
||||
leftStickHorizontal?: ResolvedControllerAxisBinding;
|
||||
leftStickVertical?: ResolvedControllerAxisBinding;
|
||||
rightStickHorizontal?: ResolvedControllerAxisBinding;
|
||||
@@ -357,6 +368,8 @@ export type ResolvedControllerFieldGroupingBindings = Record<
|
||||
|
||||
export interface ControllerProfileConfig {
|
||||
label?: string;
|
||||
/** Overrides `controller.faceButtonLabels` for this controller; set from Alt+C. */
|
||||
faceButtonLabels?: ControllerFaceButtonLabels;
|
||||
buttonIndices?: ControllerButtonIndicesConfig;
|
||||
bindings?: ControllerBindingsConfig;
|
||||
reviewBindings?: ControllerReviewBindingsConfig;
|
||||
@@ -365,6 +378,7 @@ export interface ControllerProfileConfig {
|
||||
|
||||
export interface ResolvedControllerProfileConfig {
|
||||
label: string;
|
||||
faceButtonLabels: ControllerFaceButtonLabels;
|
||||
buttonIndices: Required<ControllerButtonIndicesConfig>;
|
||||
bindings: Required<ResolvedControllerBindingsConfig>;
|
||||
reviewBindings: ResolvedControllerReviewBindings;
|
||||
@@ -398,6 +412,8 @@ export interface ControllerDeviceInfo {
|
||||
index: number;
|
||||
mapping: string;
|
||||
connected: boolean;
|
||||
/** Gamepad API timestamp of the pad's last input; the newest is the one being used. */
|
||||
timestamp?: number;
|
||||
}
|
||||
|
||||
export interface ControllerButtonSnapshot {
|
||||
@@ -593,6 +609,10 @@ export interface ElectronAPI {
|
||||
markActiveVideoWatched: () => Promise<boolean>;
|
||||
getControllerConfig: () => Promise<ResolvedControllerConfig>;
|
||||
saveControllerConfig: (update: ControllerConfigUpdate) => Promise<void>;
|
||||
/** The overlay reports which controller it is reading (null when none). */
|
||||
reportActiveController: (gamepadId: string | null) => void;
|
||||
/** The controller the overlay last reported, for Alt+C before it sees a pad itself. */
|
||||
getActiveControllerId: () => Promise<string | null>;
|
||||
getJimakuMediaInfo: () => Promise<JimakuMediaInfo>;
|
||||
jimakuSearchEntries: (query: JimakuSearchQuery) => Promise<JimakuApiResponse<JimakuEntry[]>>;
|
||||
jimakuListFiles: (query: JimakuFilesQuery) => Promise<JimakuApiResponse<JimakuFileEntry[]>>;
|
||||
@@ -673,6 +693,10 @@ export interface ElectronAPI {
|
||||
) => void;
|
||||
onKeyboardModeToggleRequested: (callback: () => void) => void;
|
||||
onControllerSuspendedChanged: (callback: (suspended: boolean) => void) => void;
|
||||
/** Alt+C saved controller settings; reload them with `getControllerConfig`. */
|
||||
onControllerConfigChanged: (callback: () => void) => void;
|
||||
/** mpv's pause property changed, from any source. */
|
||||
onPlaybackPauseChanged: (callback: (paused: boolean) => void) => void;
|
||||
onLookupWindowToggleRequested: (callback: () => void) => void;
|
||||
getPlaylistBrowserSnapshot: () => Promise<PlaylistBrowserSnapshot>;
|
||||
appendPlaylistBrowserFile: (path: string) => Promise<PlaylistBrowserMutationResult>;
|
||||
|
||||
Reference in new issue
Block a user