Skip to content

Commit

Permalink
perf: ♻️ Optimize mirror group
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 7, 2023
1 parent 0c9d36f commit cf9c82d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion electron/exposes/scrcpy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const mirrorGroup = async (serial, { open = 1, ...options } = {}) => {
exec: true,
}).catch((error) => {
console.warn(
'error',
'mirrorGroup.error',
error?.message
|| error?.cause?.message
|| `display-id-${displayId}: Open failed`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ export default {
this.loading = true
try {
await this.$scrcpy.mirrorGroup(this.device.id, {
const res = await this.$scrcpy.mirrorGroup(this.device.id, {
open,
title: ({ displayId }) =>
`${this.device.$remark ? `${this.device.$remark}-` : ''}${
this.device.$name
}-${this.device.id}-display-${displayId}`,
args: this.scrcpyArgs(this.device.id),
})
console.log('handleMirror.res', res)
}
catch (error) {
console.warn(error.message)
Expand Down

0 comments on commit cf9c82d

Please sign in to comment.