Skip to content

Commit

Permalink
fix(scrcpy): remove extra version parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
yume-chan committed Dec 23, 2024
1 parent 8c5b3c2 commit aeaa902
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
10 changes: 4 additions & 6 deletions libraries/adb-scrcpy/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,26 @@ export class AdbScrcpyClient {
* This method will modify the given `options`,
* so don't reuse it elsewhere.
*/
static async getEncoders(
static getEncoders(
adb: Adb,
path: string,
version: string,
options: AdbScrcpyOptions<object>,
): Promise<ScrcpyEncoder[]> {
options.setListEncoders();
return await options.getEncoders(adb, path, version);
return options.getEncoders(adb, path);
}

/**
* This method will modify the given `options`,
* so don't reuse it elsewhere.
*/
static async getDisplays(
static getDisplays(
adb: Adb,
path: string,
version: string,
options: AdbScrcpyOptions<object>,
): Promise<ScrcpyDisplay[]> {
options.setListDisplays();
return await options.getDisplays(adb, path, version);
return options.getDisplays(adb, path);
}

#options: AdbScrcpyOptions<object>;
Expand Down
4 changes: 1 addition & 3 deletions libraries/adb-scrcpy/src/options/latest.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import { AdbScrcpyOptions2_1 } from "./2_1.js";

export class AdbScrcpyOptionsLatest extends AdbScrcpyOptions2_1 {}
export { AdbScrcpyOptions2_1 as AdbScrcpyOptionsLatest } from "./2_1.js";
12 changes: 2 additions & 10 deletions libraries/adb-scrcpy/src/options/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ import type { AdbScrcpyConnection } from "../connection.js";
export abstract class AdbScrcpyOptions<
T extends object,
> extends ScrcpyOptionsWrapper<T> {
abstract getEncoders(
adb: Adb,
path: string,
version: string,
): Promise<ScrcpyEncoder[]>;
abstract getEncoders(adb: Adb, path: string): Promise<ScrcpyEncoder[]>;

abstract getDisplays(
adb: Adb,
path: string,
version: string,
): Promise<ScrcpyDisplay[]>;
abstract getDisplays(adb: Adb, path: string): Promise<ScrcpyDisplay[]>;

abstract createConnection(adb: Adb): AdbScrcpyConnection;
}
1 change: 1 addition & 0 deletions libraries/scrcpy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export * from "./2_7/index.js";
export * from "./3_0/index.js";
export * from "./3_0_1.js";
export * from "./3_0_2.js";
export * from "./3_1/index.js";
export * from "./android/index.js";
export * from "./base/index.js";
export * from "./codec/index.js";
Expand Down

0 comments on commit aeaa902

Please sign in to comment.