Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit e0def5b8 authored by Simon Chan's avatar Simon Chan
Browse files

feat(scrcpy): add support for server version 3.3.1

parent 7edd616b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
---
"@yume-chan/scrcpy": patch
---

Add support for server version 3.3.1
+6 −0
Original line number Diff line number Diff line
export * from "../../3_2/impl/index.js";

export {
    createScrollController,
    ScrollController,
} from "./scroll-controller.js";
+1 −0
Original line number Diff line number Diff line
export * as PrevImpl from "../../3_2/impl/index.js";
+21 −0
Original line number Diff line number Diff line
import type { ScrcpyScrollController } from "../../base/index.js";
import type { ScrcpyInjectScrollControlMessage } from "../../latest.js";

import { PrevImpl } from "./prev.js";

export class ScrollController implements ScrcpyScrollController {
    serializeScrollMessage(
        message: ScrcpyInjectScrollControlMessage,
    ): Uint8Array | undefined {
        message = {
            ...message,
            scrollX: message.scrollX / 16,
            scrollY: message.scrollY / 16,
        };
        return PrevImpl.InjectScrollControlMessage.serialize(message);
    }
}

export function createScrollController(): ScrcpyScrollController {
    return new ScrollController();
}
+1 −0
Original line number Diff line number Diff line
export * from "./options.js";
Loading