Romain Vimont
e050cfdcd6
Fix static_assert() parameters
...
In C11, static_assert() expects a message.
5 years ago
Romain Vimont
dc7c677728
Accept negative window position
...
It seems to work on some window managers.
Fixes #1242 <https://github.com/Genymobile/scrcpy/issues/1242 >
5 years ago
Romain Vimont
3504c0016b
Add tests for control message length
...
This will avoid regressions for #1245 .
<https://github.com/Genymobile/scrcpy/issues/1245 >
5 years ago
Romain Vimont
89d1602185
Fix expected message length for touch events
...
The expected length for a touch event control message was incorrect. As
a consequence, a BufferUnderflowException could occur.
Fixes #1245 <https://github.com/Genymobile/scrcpy/issues/1245 >
5 years ago
Romain Vimont
566ba766af
Remove unused constant
...
It has not been removed when mouse and touch events have been merged.
5 years ago
Tzah Mazuz
a0af402d96
Fix the printed versions (were opposite)
...
PR #1224 <https://github.com/Genymobile/scrcpy/pull/1224 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont
600df37753
Mention AutoAdb in README
5 years ago
Romain Vimont
902b99174d
Fix server debugger for Android >= 9
...
Add a compilation flag to select the debugger method to use:
- old: Android < 9
- new: Android >= 9
See <https://github.com/Genymobile/scrcpy/issues/1187#issuecomment-599075661 >
5 years ago
Jaafar Biyadi
cd69eb4a4f
Handle NumPad events when NumLock is disabled
...
PR #1188 <https://github.com/Genymobile/scrcpy/pull/1188 >
Fixes #1048 <https://github.com/Genymobile/scrcpy/issues/1048 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont
ae2d094362
Handle locked video orientation from ScreenInfo
...
Centralize video size management in ScreenInfo.
This allows to always send the correct initial video size to the client
if the video orientation is locked.
5 years ago
Romain Vimont
c5f5d1e456
Rename "rotation" to "device rotation"
...
This paves the way to reduce confusion in ScreenInfo when it will handle
locked video orientation.
5 years ago
Romain Vimont
63286424bb
Compute all screen info from ScreenInfo
...
Screen information was partially initialized from Device. Move this
initialization to ScreenInfo.
5 years ago
Romain Vimont
da18c9cdab
Remove useles import
5 years ago
yangfl
d3281f4b67
Show a friendly hint for adb installation
...
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
George Stamoulis
1982bc439b
Add option to lock video orientation
...
PR #1151 <https://github.com/Genymobile/scrcpy/pull/1151 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont
ef56cc6ff7
Retrieve screen info once
...
The method getScreenInfo() is synchronized, and the result may change
between calls.
Call it once and store the result in a local variable.
5 years ago
Romain Vimont
c0f428eb05
Merge branch 'master' into dev
5 years ago
Romain Vimont
4794ca8ae7
Use linear filtering
...
Anisotropic filtering makes no sense for scrcpy use case.
This (semantically) reverts 9e328ef98b
.
5 years ago
George Stamoulis
f903cd376d
Documentation rectifications
...
PR #1151 <https://github.com/Genymobile/scrcpy/pull/1151 >
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 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>
5 years ago
Romain Vimont
1144f64214
Indicate that -s can also be used for TCP/IP
5 years ago
Romain Vimont
39356602ed
Mention scrcpy Debian package in README
5 years ago
Romain Vimont
0fb22c3e98
Happy new year 2020!
5 years ago
Romain Vimont
96bd2c974d
Do not report workarounds errors
...
Some workarounds are needed on some devices. But applying them may cause
exceptions on other devices, where they are not necessary anyway.
Do not report these errors in release builds.
Closes #994 <https://github.com/Genymobile/scrcpy/issues/994 >
5 years ago
Romain Vimont
dc7fcf3c7a
Accept port range
...
Accept a range of ports to listen to, so that it does not fail if
another instance of scrcpy is currently starting.
The range can be passed via the command line:
scrcpy -p 27183:27186
scrcpy -p 27183 # implicitly 27183:27183, as before
The default is 27183:27199.
Closes #951 <https://github.com/Genymobile/scrcpy/issues/951 >
5 years ago
Romain Vimont
2a3a9d4ea9
Add util function to parse a list of integers
...
This will help parsing arguments like '1234:5678' into a list of
integers.
5 years ago
Romain Vimont
ca0031cbde
Refactor server tunnel initialization
...
Start the server socket in enable_tunnel() directly.
For the caller point of view, enabling the tunnel opens a port (either
the server socket locally or the "adb forward" process).
5 years ago
Romain Vimont
d1a9a76cc6
Reorder functions
...
Move functions so that they can be called from enable_tunnel() (in the
following commit).
5 years ago
Romain Vimont
a8ceaf5284
Fix include order
5 years ago
Romain Vimont
83d48267a7
Accept --max-fps before Android 10
...
KEY_MAX_FPS_TO_ENCODER existed privately before Android 10:
<https://github.com/Genymobile/scrcpy/issues/488#issuecomment-567321437 >
5 years ago
Romain Vimont
db6252e52b
Simplify net.c
...
The platform-specific code for net.c was implemented in sys/*/net.c.
But the differences are quite limited, so use ifdef-blocks in the single
net.c instead.
5 years ago
Romain Vimont
229eeb24a2
Merge pull request #1002 into dev
...
Fix utf-8 char path in windows
<https://github.com/Genymobile/scrcpy/pull/1002 >
5 years ago
Yu-Chen Lin
f9786e5034
Get env in windows correctly
...
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Yu-Chen Lin
78a320a763
Fix utf-8 char path in windows
...
The file 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server'
exists, however, it will show msg as follow:
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy >
stat: No such file or directory
ERROR: 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server' does
not exist or is not a regular file
Press any key to continue...
This patch fixes it.
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
5 years ago
Romain Vimont
7d5845196e
Fix memory leak on portable builds
...
The function get_server_path() sometimes returned an owned string,
sometimes a non-owned string.
Always return an allocated (owned) string, and free it after usage.
5 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