Loading apps/demo/src/components/scrcpy/settings.tsx +34 −22 Original line number Diff line number Diff line Loading @@ -27,7 +27,13 @@ import { import { TinyH264Decoder } from "@yume-chan/scrcpy-decoder-tinyh264"; import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version"; import { WritableStream } from "@yume-chan/stream-extra"; import { autorun, computed, makeAutoObservable, runInAction } from "mobx"; import { autorun, computed, makeAutoObservable, observable, runInAction, } from "mobx"; import { observer } from "mobx-react-lite"; import { GLOBAL_STATE } from "../../state"; import { Icons } from "../../utils"; Loading Loading @@ -191,7 +197,8 @@ export interface DecoderDefinition { Constructor: H264DecoderConstructor; } export const SETTING_STATE = makeAutoObservable({ export const SETTING_STATE = makeAutoObservable( { settingsVisible: false, displays: [] as number[], Loading @@ -212,7 +219,12 @@ export const SETTING_STATE = makeAutoObservable({ crop: "", powerOn: true, } as Settings, }); }, { decoders: observable.shallow, settings: observable.deep, } ); autorun(() => { if (GLOBAL_STATE.device) { Loading Loading
apps/demo/src/components/scrcpy/settings.tsx +34 −22 Original line number Diff line number Diff line Loading @@ -27,7 +27,13 @@ import { import { TinyH264Decoder } from "@yume-chan/scrcpy-decoder-tinyh264"; import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version"; import { WritableStream } from "@yume-chan/stream-extra"; import { autorun, computed, makeAutoObservable, runInAction } from "mobx"; import { autorun, computed, makeAutoObservable, observable, runInAction, } from "mobx"; import { observer } from "mobx-react-lite"; import { GLOBAL_STATE } from "../../state"; import { Icons } from "../../utils"; Loading Loading @@ -191,7 +197,8 @@ export interface DecoderDefinition { Constructor: H264DecoderConstructor; } export const SETTING_STATE = makeAutoObservable({ export const SETTING_STATE = makeAutoObservable( { settingsVisible: false, displays: [] as number[], Loading @@ -212,7 +219,12 @@ export const SETTING_STATE = makeAutoObservable({ crop: "", powerOn: true, } as Settings, }); }, { decoders: observable.shallow, settings: observable.deep, } ); autorun(() => { if (GLOBAL_STATE.device) { Loading