mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 12:00:16 +02:00
feat(adb): allow remote error to stop sync push
This commit is contained in:
parent
4563a41c36
commit
57fc991452
14 changed files with 404 additions and 221 deletions
|
@ -1,5 +1,5 @@
|
|||
import { ICommandBarItemProps, Stack } from "@fluentui/react";
|
||||
import { AdbFrameBuffer } from "@yume-chan/adb";
|
||||
import { AdbFrameBuffer, AdbFrameBufferV2 } from "@yume-chan/adb";
|
||||
import { action, autorun, computed, makeAutoObservable } from "mobx";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { NextPage } from "next";
|
||||
|
@ -47,7 +47,19 @@ const FrameBuffer: NextPage = (): JSX.Element | null => {
|
|||
}
|
||||
|
||||
try {
|
||||
const start = Date.now();
|
||||
const framebuffer = await GLOBAL_STATE.device.framebuffer();
|
||||
console.log(
|
||||
"Framebuffer speed",
|
||||
(
|
||||
(((AdbFrameBufferV2.size + framebuffer.size) /
|
||||
(Date.now() - start)) *
|
||||
1000) /
|
||||
1024 /
|
||||
1024
|
||||
).toFixed(2),
|
||||
"MB/s"
|
||||
);
|
||||
state.setImage(framebuffer);
|
||||
} catch (e: any) {
|
||||
GLOBAL_STATE.showErrorDialog(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue