Commit Graph

351 Commits (d706c5df3991a35b5f98058bfd2f640bcef05ea7)
 

Author SHA1 Message Date
Romain Vimont 6fa209fa82 Remove AINPUT_SOURCE_ANY value
In the Android input header file, an enum has a value taking more than
31 bits, leading to the following warning:

    ISO C restricts enumerator values to range of ‘int’

Since we don't use it, remove it.
6 years ago
Romain Vimont b37c0f6cd6 Replace Uint32 by int to fix warnings in tinyxpm 6 years ago
Romain Vimont c4a1fc746b Explicitly use ISO C11
ISO C99 doesn't support unnamed structs/unions.
6 years ago
npes87184 a3ab92226d Destroy mutex if strdup failed
Signed-off-by: npes87184 <npes87184@gmail.com>
6 years ago
Romain Vimont ec66b3be82
Merge pull request #225 from npes87184/master
remove redundant semicolon
6 years ago
npes87184 f8ef4f1cf7 remove redundant semicolon
Signed-off-by: npes87184 <npes87184@gmail.com>
6 years ago
Romain Vimont 9e683b7dac Update links to v1.3 in README 6 years ago
Romain Vimont 7e42358a7b Bump version to 1.3 6 years ago
Romain Vimont caa9e30004 Add crop feature
Add an option to crop the screen on the server. This allows to mirror
only part of the device screen.
6 years ago
Romain Vimont e85010fbc2 Move annotation comment
This confused the Android Studio code formatter.
6 years ago
Romain Vimont 820cd2bb54 Extract video size computation
One method, one thing.
6 years ago
Romain Vimont 8793c104ee Increase "adb forward" connection attempts
5 seconds might not be sufficient:
<https://github.com/Genymobile/scrcpy/issues/213>

Increase to 10 seconds (it does not harm).
6 years ago
Romain Vimont fca806e095 Do not call deprecated av_register_all()
av_register_all() is deprecated in FFmpeg since this commit:
<http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=0694d8702421e7aff1340038559c438b61bb30dd>

It is now useless to call it:
<https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225051.html>

Fixes <https://github.com/Genymobile/scrcpy/issues/203>.
6 years ago
Romain Vimont 280891837e Simplify README for Windows users
So that users stop downloading platform-tools unnecessarily.
6 years ago
Romain Vimont 49b2e63d13 Forward repeated volume events
Send repeated events when holding volume up/down shortcuts.
6 years ago
Romain Vimont c12c64ed41 Send separate DOWN/UP key events
Shortcuts generated instant DOWN/UP key events. Instead, generate DOWN
event on Ctrl+key down and UP event on Ctrl+key up.

Fixes <https://github.com/Genymobile/scrcpy/issues/166>.
6 years ago
Romain Vimont 2f66acd75d Improve English comment
Replace "implying" by "involving" (both "impliquant" in French).
6 years ago
Romain Vimont 1846d2f078 Prevent killing unexpected process
A missing initialization (fixed by the previous commit) leaded to kill
unexpected process.

In order to prevent consequences of similar errors in the future, never
call kill() with a non-positive PID.

See <https://github.com/Genymobile/scrcpy/issues/182>.
6 years ago
Romain Vimont 1a0139321b Fix missing installer initialization
The current_process field of struct installer was not initialized.
Since the installer instance is static, its default value was 0.

The call to installer_stop() then called kill(0, SIGTERM) (on Linux),
which sent SIGTERM to every process in the process group. In particular,
the scrcpy process was killed.

As a consequence, the last cleanup steps, like disabling "show touches",
were not executed.

Fixes <https://github.com/Genymobile/scrcpy/issues/183>.
6 years ago
Romain Vimont 8890750681
Merge pull request #169 from zopelee/master
Fix meson error: ‘for’ loop initial declarations are only allowed in …
6 years ago
zack aac9d5057f Fix meson error: ‘for’ loop initial declarations are only allowed in C99 mode. 6 years ago
Romain Vimont f705a73149 Use a meson option to crossbuild for Windows
Meson decided to crossbuild for Windows as soon as
meson.is_cross_build() returned true. This made non-Windows crossbuilds
fail.

Instead, add an explicit option "crossbuild_windows".

Fixes <https://github.com/Genymobile/scrcpy/issues/165>.
6 years ago
Romain Vimont 27a9bd3424 Fix clean recipe in cross Makefile
Make the "clean" recipe also remove the noconsole build directories.
6 years ago
Romain Vimont cf121a0f65 Upgrade gradle 6 years ago
Romain Vimont c8a5f9dc63 Update links to v1.2 in README 6 years ago
Romain Vimont 8106bb8215 Bump version to 1.2 6 years ago
Romain Vimont f1b3a40375 Rename SHA256SUM to SHA256SUMS
It contains the checksums for several files.
6 years ago
Romain Vimont a63dd47f2d Make CreateProcess() flags depend on "noconsole"
On Windows, display the output of external commands (adb) when a console
is available.
6 years ago
Romain Vimont 6b4bbb1fb3 Update README and FAQ for the new Windows releases
Document how to generate a Windows release from Linux.

It solves the "no output" issue on Windows, so update the FAQ.
6 years ago
Romain Vimont aedc2c2da9 Also build "noconsole" binary for Windows
On Windows, an application is either console or gui, it cannot be both.

Scrcpy should be both: it outputs important information to console, but
we still want to be able to ignore the console and launch it without a
visible cmd.exe window.

Therefore, build two binaries:
 - scrcpy.exe
 - scrcpy-noconsole.exe
6 years ago
Romain Vimont 106b87a4d2 Add cross-compilation scripts for Windows
Build the Windows binary from mingw on Linux, using the official
prebuilt binaries for ffmpeg, SDL2 and adb.

MSYS2 and all its packaged dll are not necessary anymore.
6 years ago
Romain Vimont 7d68316f45 Indicate that libs are included for Windows 6 years ago
Romain Vimont e729b76176 Indicate that scrcpy also works over TCP/IP 6 years ago
Romain Vimont 6274cc3767 Document APK drag & drop
Add the drag & drop shortcut for installing an APK file to the README
and the help.
6 years ago
Romain Vimont 9c6f9b24f9 Quote apk path on Windows
Windows will parse the string, so the local name must be quoted.
6 years ago
Adonis Najimi e2a2973990 Drag and drop to install apk files from computer
<https://github.com/Genymobile/scrcpy/pull/133>
6 years ago
Romain Vimont 41419a2e77 Fix net_send_all() warning
If len is not positive, w could be returned uninitialized.
6 years ago
Romain Vimont e3d0a59c80 Fix proc_show_touches warning
In practice, proc_show_touches may not be used uninitialized, since it
checks the flag options->show_touches, but the compiler can't know that,
so initialize it to avoid the warning.
6 years ago
Romain Vimont bb3a7f05ac Release controller lock while processing events
Once the controller took a control event, release the mutex before
processing it, so that the main thread is not blocked to push a new
event.
6 years ago
Romain Vimont ec02823045 Fix leak on server start error
Fail on SDL_strdup() failure, and free the duplicated serial on further
error.
6 years ago
Romain Vimont 435a7fe314 Add missing includes
Include string.h and stdio.h explicitly.
6 years ago
Romain Vimont 78da66f126 Merge branch 'master' into dev 6 years ago
Romain Vimont 9aa88b6fc3 Map numpad ENTER key
Forward numpad ENTER key to the device.

Fixes <https://github.com/Genymobile/scrcpy/issues/117>.
6 years ago
Romain Vimont f8ad7df3be Add FAQ section about KWin crash
Link to the workaround to keep the compositor enabled while _scrcpy_ is
running.
6 years ago
Romain Vimont 0871bca9c7 Avoid pointer arithmetic on "void *"
Fix the following warning (with -Wpedantic enabled):

    pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
6 years ago
Romain Vimont b2b5404883 Use const pointers when possible
Sending data only require to read the input buffer, so declare it const.
6 years ago
Romain Vimont 1bddb80b5f Change volume shortcuts
I could not make Ctrl+'+' and Ctrl+'-' work for every keyboard on every
platform.

Instead, use Ctrl+UP and Ctrl+DOWN (like in VLC) to change the volume.

Fixes <https://github.com/Genymobile/scrcpy/issues/103>.
6 years ago
Romain Vimont 6323f3974f Document 32 bits packages Windows in README
To build for Windows 32 bits, use the i686 packages instead.
6 years ago
Romain Vimont 16a3de1796 Make checkstyle happy
Reorder the imports to remove checkstyle warnings.
6 years ago
Romain Vimont 6161f7688c Install on macOS via Homebrew in README
The application is now packaged for Homebrew:
<https://github.com/Homebrew/homebrew-core/pull/25173>

Give instructions to install it from Homebrew for macOS (it's much
easier).

Thanks to @stek29 for the formula ;-)
6 years ago