diff --git a/CHANGELOG.md b/CHANGELOG.md index e920db9..e491060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.28.3](https://github.com/viarotel-org/escrcpy/compare/v1.28.2...v1.28.3) (2024-12-28) + + +### Performance Improvements + +* ♻️ Optimize device details performance ([38d1433](https://github.com/viarotel-org/escrcpy/commit/38d1433a82d6c22c9bb6db681533c93e788e4cff)) + +## [1.28.2](https://github.com/viarotel-org/escrcpy/compare/v1.28.1...v1.28.2) (2024-12-27) + + +### Performance Improvements + +* 👷 Optimize the edge hiding function ([d5caaa9](https://github.com/viarotel-org/escrcpy/commit/d5caaa915c5e979c2217357cf74efe20d477c5ba)) +* 📸 Support viewing real-time images and power information of the device ([d262adf](https://github.com/viarotel-org/escrcpy/commit/d262adf54df2a28c734b3db1a5d17bbccd983db9)) + ## [1.28.1](https://github.com/viarotel-org/escrcpy/compare/v1.28.0...v1.28.1) (2024-12-20) diff --git a/electron/exposes/adb/index.js b/electron/exposes/adb/index.js index cdd2198..b7b8e61 100644 --- a/electron/exposes/adb/index.js +++ b/electron/exposes/adb/index.js @@ -125,18 +125,12 @@ const tcpip = async (id, port = 5555) => client.getDevice(id).tcpip(port) const screencap = async (deviceId, options = {}) => { const { returnBase64 = false } = options - let fileStream = null - try { - const device = client.getDevice(deviceId) - fileStream = await device.screencap() - } - catch (error) { - console.warn(error?.message || error) - return false - } + const device = client.getDevice(deviceId) + + const fileStream = await device.screencap() if (!fileStream) { - return false + throw new Error('Failed to obtain screenshot data') } if (returnBase64) { @@ -285,17 +279,11 @@ async function connectCode(password, options = {}) { } async function battery(id) { - try { - const res = await deviceShell(id, 'dumpsys battery') + const res = await deviceShell(id, 'dumpsys battery') - const value = parseBatteryDump(res) + const value = parseBatteryDump(res) - return value - } - catch (error) { - console.warn(error?.message || error) - return {} - } + return value } async function pair(host, port, code) { diff --git a/package.json b/package.json index 5b6ea4f..473f39d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "escrcpy", "type": "module", - "version": "1.28.1", + "version": "1.28.3", "private": true, "packageManager": "pnpm@9.12.3", "description": "Scrcpy Powered by Electron", @@ -23,7 +23,7 @@ }, "devDependencies": { "@antfu/eslint-config": "3.8.0", - "@devicefarmer/adbkit": "3.2.6", + "@devicefarmer/adbkit": "3.3.8", "@electron-toolkit/preload": "3.0.1", "@electron-toolkit/utils": "3.0.0", "@electron/remote": "2.1.2", diff --git a/src/components/ControlBar/index.vue b/src/components/ControlBar/index.vue index 0838d5b..9a33203 100644 --- a/src/components/ControlBar/index.vue +++ b/src/components/ControlBar/index.vue @@ -1,6 +1,6 @@