mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-01-27 09:34:37 +01:00
Do not report error on device disconnected
A device disconnection (when the adb connection is closed) makes the
read() on the "receiver" socket fail.
Since commit 063a8339ed, this is reported
as an error. As a consequence, scrcpy fails with:
ERROR: Controller error
instead of:
WARN: Device disconnected
To fix the issue, report a device disconnection in that case.
PR #5044 <https://github.com/Genymobile/scrcpy/pull/5044>
This commit is contained in:
@@ -28,7 +28,8 @@ struct sc_controller {
|
||||
};
|
||||
|
||||
struct sc_controller_callbacks {
|
||||
void (*on_error)(struct sc_controller *controller, void *userdata);
|
||||
void (*on_ended)(struct sc_controller *controller, bool error,
|
||||
void *userdata);
|
||||
};
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user