fix(scrcpy): incorrect scroll controller in version 1.22 and later

This commit is contained in:
Simon Chan 2024-12-10 12:35:44 +08:00
parent 6140ebc772
commit 7f2a09c378
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
7 changed files with 23 additions and 7 deletions

View file

@ -2,8 +2,8 @@ import { getInt16, setInt16 } from "@yume-chan/no-data-view";
import type { Field, StructInit } from "@yume-chan/struct";
import { bipedal, struct, u16, u32, u8 } from "@yume-chan/struct";
import { ScrcpyControlMessageType } from "../../base/index.js";
import type { ScrcpyScrollController } from "../../base/index.js";
import { ScrcpyControlMessageType } from "../../base/index.js";
import type { ScrcpyInjectScrollControlMessage } from "../../latest.js";
import { clamp } from "../../utils/index.js";
@ -49,3 +49,7 @@ export class ScrollController implements ScrcpyScrollController {
return InjectScrollControlMessage.serialize(message);
}
}
export function createScrollController(): ScrcpyScrollController {
return new ScrollController();
}