Properly handle Ctrl+C on Windows

By default, Ctrl+C just kills the process on Windows. This caused
corrupted video files on recording.

Handle Ctrl+C properly to clean up properly.

Fixes #818 <https://github.com/Genymobile/scrcpy/issues/818>
This commit is contained in:
Romain Vimont
2020-05-08 14:54:33 +02:00
parent e2d5f0e7fc
commit 28abd98f7f
2 changed files with 24 additions and 1 deletions

View File

@@ -210,7 +210,6 @@ To disable mirroring while recording:
scrcpy --no-display --record file.mp4
scrcpy -Nr file.mkv
# interrupt recording with Ctrl+C
# Ctrl+C does not terminate properly on Windows, so disconnect the device
```
"Skipped frames" are recorded, even if they are not displayed in real time (for