Commit Graph

758 Commits (2cf022491f39d5d1d8d09330e9c5a5fba73567f4)
 

Author SHA1 Message Date
Romain Vimont 2cf022491f Add issue templates
Closes #1157 <https://github.com/Genymobile/scrcpy/issues/1157>
4 years ago
Romain Vimont 7bb91638ad Improve FAQ 4 years ago
Yogev Boaron Ben-Har bc7508427b Add scoop instructions for Windows
PR #1202 <https://github.com/Genymobile/scrcpy/pull/1202>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 24ade6ad77 Simplify Chocolatey documentation 4 years ago
Romain Vimont c396758b4e Remove link to Windows 32 bits release
Binaries created with MinGW (even a simple Hello World) are detected as
malware by some anti-virus. For some reason, only the 32 bits version of
scrcpy is impacted.

Since users should use the 64 bits version by default anyway, remove the
link to the 32 bits version from the main page.

The 32 bits release is still available in the "releases" tab.

See <https://github.com/Genymobile/scrcpy/issues/1102>
4 years ago
George Stamoulis f903cd376d Documentation rectifications
PR #1151 <https://github.com/Genymobile/scrcpy/pull/1151>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Camilo Martinez e8127375ae Add Chocolatey for Windows install
PR #1144 <https://github.com/Genymobile/scrcpy/pull/1144>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 1144f64214 Indicate that -s can also be used for TCP/IP 4 years ago
Romain Vimont 39356602ed Mention scrcpy Debian package in README 4 years ago
Romain Vimont 0fb22c3e98 Happy new year 2020! 4 years ago
Romain Vimont 31bd95022b Update links to v1.12.1 in README and BUILD 5 years ago
Romain Vimont 4687a0ebac Bump version to 1.12.1 5 years ago
Romain Vimont 6965d051ae Limit bitrate range to 31 bits integer
A proper solution could be to use "long long" instead (guaranteed to be
at least 64 bits), but it adds its own problems (e.g. "%lld" is not
supported as a printf format on all platforms).

In practice, we don't need such high values, so keep it simple.

Fixes #995 <https://github.com/Genymobile/scrcpy/issues/995>
5 years ago
Romain Vimont 71df3175bd Update links to v1.12 in README and BUILD 5 years ago
Romain Vimont a0f8e7fd9f Bump version to 1.12 5 years ago
Romain Vimont e4cebc8d4c Do not build tests in release mode
Assertions would not be executed.

And as a side effect, it causes "unused variable" warnings.
5 years ago
Romain Vimont ba1b36758e Define SDL_MAIN_HANDLED in all tests
Each test defines its own main() function. If this flag is not set, then
SDL redefines it to SDL_main(), causing compilation failures.
5 years ago
Romain Vimont ad92a192b5 Fix meson.build codestyle 5 years ago
Romain Vimont 81a8e503e5 Describe screen rotation shortcut in README 5 years ago
Romain Vimont 242e57d69b Merge branch 'master' into dev 5 years ago
Romain Vimont 024c2f7e6b Configure log priority early
The log priority must be configured before parsing command-line
arguments, in order to get logs as expected.
5 years ago
Romain Vimont 1eae139b6e Add missing consts
String parsing functions should not be able to modify their input.
5 years ago
Romain Vimont 419c869c9c Use ARRAY_LEN() macro in tests 5 years ago
Romain Vimont 929bf48c7e Add tests for command-line parsing 5 years ago
Romain Vimont d950383b72 Move command-line parsing to a separate file 5 years ago
Romain Vimont 61274a7cdb Factorize integer argument parsing
Add util functions for integer parsing (with tests), and factorize
integer argument parsing to avoid code duplication.
5 years ago
Romain Vimont 64bcac9157 Refuse to push a non-regular file server
If SCRCPY_SERVER_PATH points to a directory, then a directory will be
pushed to /data/local/tmp/scrcpy-server.jar.

When executing it, app_process will just abort and leave the directory
on the device, causing scrcpy to always fail.

To avoid the problem, check that the server is a regular file before
pushing it.

Closes #956 <https://github.com/Genymobile/scrcpy/issues/956>
5 years ago
Romain Vimont 3259c60b22 Fix test compilation on mingw
Including SDL2/SDL.h redefines main to SDL_main by default.
5 years ago
Romain Vimont e0b117de13 Fix checkstyle warning 5 years ago
Romain Vimont eb0f339271 Add shortcut to rotate screen
On Ctrl+r, disable auto-rotation (if enabled), set the screen rotation
and re-enable auto-rotation (if it was enabled).

Closes #11 <https://github.com/Genymobile/scrcpy/issues/11>
5 years ago
Romain Vimont bdd05b4a16 Refactor wrappers for Android SDK classes
Internally, a failure to invoke a method via reflection was partially
managed using exceptions, partially using a null return value.

Handle all errors at the same place, by not catching
NoSuchMethodException too early.
5 years ago
Romain Vimont 525d6d4a75 Try new methods before legacy ones
Use the legacy methods when the new ones do not exist.
5 years ago
Romain Vimont 4041043d1c Merge pull request #967 into dev
Add some tests

<https://github.com/Genymobile/scrcpy/pull/967>
5 years ago
Yu-Chen Lin fbc86a616c Correct coding style
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
5 years ago
Yu-Chen Lin b2bf25c52c Add test_buffer_util
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
5 years ago
Yu-Chen Lin 5eeaed09ae Add test_strquote
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
5 years ago
Romain Vimont 3100533e56 Fix "natural scrolling"
> Movements down (scroll backward) generate negative y values and up
> (scroll forward) generate positive y values.

> If direction is SDL_MOUSEWHEEL_FLIPPED the values in x and y will be
> opposite. Multiply by -1 to change them back.

<https://wiki.libsdl.org/SDL_MouseWheelEvent#Remarks>

The x and y values already take the scrolling configuration into
account. Reversing the values when the direction is flipped cancels the
scrolling configuration.

Therefore, just ignore the direction field.

Fixes <https://github.com/Genymobile/scrcpy/issues/966>
5 years ago
Seb Leo 684e0abb74 Update BUILD.md to install adb package
PR <https://github.com/Genymobile/scrcpy/pull/965>

Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont 86fcd89d80 Fix max size default value
Suggested-by: jurkov

Closes <https://github.com/Genymobile/scrcpy/issues/978>
5 years ago
Romain Vimont 8a694a9785 Suggest workaround for error 0xfffffc0e
When the hardware encoder is not able to encode at the given definition,
it fails with an error 0xfffffc0e.

It is documented in the FAQ:
<https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#i-get-an-error-could-not-open-video-stream>

But it is better to directly suggest the workaround in the console.
5 years ago
Romain Vimont 26529d377f Use virtual device id to avoid NPE
Inject mouse events using id -1 (virtual device) instead of 0 which
does not exist (and causes the InputDevice to be null).

Fixes <https://github.com/Genymobile/scrcpy/issues/962>
5 years ago
Romain Vimont 15a206b7fc Assert return value of mutex functions
Mutex functions may only fail due to a programming error.

Use assertions in debug builds, and ignore the value in release builds.
5 years ago
Romain Vimont d0f5a7fd9f Remove unused includes
No mutex is used in decoder.c and stream.c.
5 years ago
Romain Vimont 510caff0cd Replace SDL_assert() by assert()
SDL_assert() open a dialog on assertion failure.

There is no reason not to use assert() directly.
5 years ago
Romain Vimont b5ebb234dd Replace BUILD_DEBUG by NDEBUG
Use the "standard" NDEBUG definition, which is used by assert().
5 years ago
Romain Vimont 73e8ec1b35 Remove path argument from cmd_execute()
It is always equal to argv[0] (or not used on Windows).
5 years ago
Romain Vimont 8dc11a0286 Fix warnings on Windows
fix warnings reported with -Dwarning_level=2 on Windows.
5 years ago
Romain Vimont 06104a701b Fix windows build
Utilities have been moved to util/, but includes had not been updated
in Windows-specific files.

Ref: dfd0707a29
5 years ago
yangfl 8bc056b9c6 Fix manpage format 5 years ago
Romain Vimont 7637a113e3 Compile with warning_level=2 by default 5 years ago