Merge branch 'master' into dev
This commit is contained in:
commit
78da66f126
7 changed files with 43 additions and 8 deletions
9
FAQ.md
9
FAQ.md
|
@ -79,3 +79,12 @@ meson x --buildtype release -Dhidpi_support=false
|
|||
```
|
||||
|
||||
However, the video will be displayed at lower resolution.
|
||||
|
||||
|
||||
### KWin compositor crashes
|
||||
|
||||
On Plasma Desktop, compositor is disabled while _scrcpy_ is running.
|
||||
|
||||
As a workaround, [disable "Block compositing"][kwin].
|
||||
|
||||
[kwin]: https://github.com/Genymobile/scrcpy/issues/114#issuecomment-378778613
|
||||
|
|
3
Makefile
3
Makefile
|
@ -9,6 +9,9 @@
|
|||
#
|
||||
# "make release-portable" builds a zip containing the client and the server.
|
||||
#
|
||||
# On Windows with MSYS2/mingw64, execute:
|
||||
# GRADLE="$PWD/gradlew" mingw32-make release-portable
|
||||
#
|
||||
# This is a simple Makefile because Meson is not flexible enough to execute some
|
||||
# arbitrary commands.
|
||||
|
||||
|
|
23
README.md
23
README.md
|
@ -107,6 +107,20 @@ pacman -S mingw-w64-x86_64-make \
|
|||
mingw-w64-x86_64-meson
|
||||
```
|
||||
|
||||
For a 32 bits version, replace `x86_64` by `i686`:
|
||||
|
||||
```bash
|
||||
# runtime dependencies
|
||||
pacman -S mingw-w64-i686-SDL2 \
|
||||
mingw-w64-i686-ffmpeg
|
||||
|
||||
# client build dependencies
|
||||
pacman -S mingw-w64-i686-make \
|
||||
mingw-w64-i686-gcc \
|
||||
mingw-w64-i686-pkg-config \
|
||||
mingw-w64-i686-meson
|
||||
```
|
||||
|
||||
Java (>= 7) is not available in MSYS2, so if you plan to build the server,
|
||||
install it manually and make it available from the `PATH`:
|
||||
|
||||
|
@ -116,10 +130,17 @@ export PATH="$JAVA_HOME/bin:$PATH"
|
|||
|
||||
#### Mac OS
|
||||
|
||||
Use [Homebrew] to install the packages:
|
||||
The application is available in [Homebrew]. Just install it:
|
||||
|
||||
[Homebrew]: https://brew.sh/
|
||||
|
||||
```bash
|
||||
brew install scrcpy
|
||||
```
|
||||
|
||||
Instead, you may want to build it manually. Install the packages:
|
||||
|
||||
|
||||
```bash
|
||||
# runtime dependencies
|
||||
brew install sdl2 ffmpeg
|
||||
|
|
|
@ -73,6 +73,7 @@ static enum android_metastate convert_meta_state(SDL_Keymod mod) {
|
|||
static SDL_bool convert_keycode(SDL_Keycode from, enum android_keycode *to) {
|
||||
switch (from) {
|
||||
MAP(SDLK_RETURN, AKEYCODE_ENTER);
|
||||
MAP(SDLK_KP_ENTER, AKEYCODE_NUMPAD_ENTER);
|
||||
MAP(SDLK_ESCAPE, AKEYCODE_ESCAPE);
|
||||
MAP(SDLK_BACKSPACE, AKEYCODE_DEL);
|
||||
MAP(SDLK_TAB, AKEYCODE_TAB);
|
||||
|
|
|
@ -82,11 +82,11 @@ ssize_t net_recv_all(socket_t socket, void *buf, size_t len) {
|
|||
return recv(socket, buf, len, MSG_WAITALL);
|
||||
}
|
||||
|
||||
ssize_t net_send(socket_t socket, void *buf, size_t len) {
|
||||
ssize_t net_send(socket_t socket, const void *buf, size_t len) {
|
||||
return send(socket, buf, len, 0);
|
||||
}
|
||||
|
||||
ssize_t net_send_all(socket_t socket, void *buf, size_t len) {
|
||||
ssize_t net_send_all(socket_t socket, const void *buf, size_t len) {
|
||||
ssize_t w;
|
||||
while (len > 0) {
|
||||
w = send(socket, buf, len, 0);
|
||||
|
@ -94,7 +94,7 @@ ssize_t net_send_all(socket_t socket, void *buf, size_t len) {
|
|||
return -1;
|
||||
}
|
||||
len -= w;
|
||||
buf += w;
|
||||
buf = (char *) buf + w;
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ socket_t net_accept(socket_t server_socket);
|
|||
// the _all versions wait/retry until len bytes have been written/read
|
||||
ssize_t net_recv(socket_t socket, void *buf, size_t len);
|
||||
ssize_t net_recv_all(socket_t socket, void *buf, size_t len);
|
||||
ssize_t net_send(socket_t socket, void *buf, size_t len);
|
||||
ssize_t net_send_all(socket_t socket, void *buf, size_t len);
|
||||
ssize_t net_send(socket_t socket, const void *buf, size_t len);
|
||||
ssize_t net_send_all(socket_t socket, const void *buf, size_t len);
|
||||
// how is SHUT_RD (read), SHUT_WR (write) or SHUT_RDWR (both)
|
||||
SDL_bool net_shutdown(socket_t socket, int how);
|
||||
SDL_bool net_close(socket_t socket);
|
||||
|
|
|
@ -3,6 +3,9 @@ package com.genymobile.scrcpy;
|
|||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
|
@ -10,8 +13,6 @@ import java.io.IOException;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ControlEventReaderTest {
|
||||
|
||||
|
|
Loading…
Reference in a new issue