- 07 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
To highlight the debug/release mode of the running application, use a different window icon color in debug mode.
-
由 Romain Vimont 提交于
Expose commands to build the application in debug mode.
-
- 06 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
We encounter some problems with SDL2_image on MSYS2 (Windows), so implement our own XPM parsing which does not depend on SDL_image. The input XPM is considered safe (it's in our source repo), so do not check XPM format errors. This implies that read_xpm() is not safe to call on any unsafe input. Although less straightforward, use SDL_CreateRGBSurfaceFrom() instead of SDL_CreateRGBSurfaceWithFormatFrom() because it is available with SDL versions older than 2.0.5.
-
由 Romain Vimont 提交于
In MSYS2 on Windows, the behavior is the same as on Linux. On systems where the behavior is not the same, just customize the GRADLE variable: GRADLE=gradlew make release This reverts commit de192cab.
-
- 05 2月, 2018 3 次提交
-
-
由 Romain Vimont 提交于
The hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH appeared in SDL 2.0.5. Ignore it if the SDL version is older.
-
由 Romain Vimont 提交于
The default value of GRADLE is "./gradlew", which is the correct value on Linux. On Windows, it should use gradlew.bat (by calling "gradlew") instead.
-
由 Romain Vimont 提交于
Add a bugdroid icon loaded from an XPM.
-
- 04 2月, 2018 2 次提交
-
-
由 Romain Vimont 提交于
The scrcpy() function returns a SDL_bool to indicate its success, but was initialized to 0 (SDL_FALSE) instead of SDL_TRUE.
-
由 Romain Vimont 提交于
To run the app during development, add a recipe "run" to the Makefile.
-
- 03 2月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
Expose useful methods directly in Device, without exposing the service managers.
-
- 02 2月, 2018 22 次提交
-
-
由 Romain Vimont 提交于
To guarantee that we instantiate services only one, cache the value the first time.
-
由 Romain Vimont 提交于
The purpose of handle_shortcut() was to group all actions together, whether they are initiated from a text input event or a keycode event. However, it did not handle the case where it was initiated from a mouse event (a right-click must turn the screen on), since the action was identified by the shortcut char. Instead, expose one function per action, to be called directly from where the event is handled.
-
由 Romain Vimont 提交于
-
由 Romain Vimont 提交于
Document the new shortcuts in the help (scrcpy --help).
-
由 Romain Vimont 提交于
When starting scrcpy, immediately turn the screen on.
-
由 Romain Vimont 提交于
The right-click is almost useless on Android, so use it to turn the screen on. Add a new control event type (command) to request the server to turn the screen on.
-
由 Romain Vimont 提交于
Reformated by Android Studio.
-
由 Romain Vimont 提交于
Shortcuts are sometimes initiated from a keycode event, and sometimes from a text input event. Move the handling to a unique function.
-
由 Romain Vimont 提交于
To simplify event handling code, move all actions to separate functions.
-
由 Romain Vimont 提交于
Logs were printed by the caller of switch_fullscreen(). Move them inside the function to simplify event handling code.
-
由 Romain Vimont 提交于
Add shortcuts for HOME, BACK, APPS, POWER, VOLUME_UP and VOLUME_DOWN.
-
由 Romain Vimont 提交于
The server is built as an APK to simplify the build, but in fact this is a simple jar (it is not even signed). In order to avoid confusion, rename it to .jar, so that users do not try to "adb install" it. Also rename it from "scrcpy" to "scrcpy-server" to distinguish from the client-side.
-
由 Romain Vimont 提交于
The server path may be customized using SCRCPY_APK. If its basename is different from "scrcpy.apk", it will be pushed with a different name, so the execution would fail. Therefore, force the push target filename.
-
由 Romain Vimont 提交于
Moving the mouse without any button pressed has no effect on Android. Therefore, do not even send these very frequent events.
-
由 Romain Vimont 提交于
Consider a click to gain focus as a click on the device.
-
由 Romain Vimont 提交于
Add a command-line option (-b/--bit-rate) to customize the video bit-rate.
-
由 Romain Vimont 提交于
There is no need to call strtol() if the input string is empty.
-
由 Romain Vimont 提交于
Trailing new line is not necessary in SDL_Log* methods.
-
由 Romain Vimont 提交于
Add a debug log for every succeeded shortcut action.
-
由 Romain Vimont 提交于
On rotation, scrcpy resize the window to match the new rotation. However, in fullscreen mode, setting the window size does not change the windowed size on X11, so the behavior is incorrect. To avoid the problem, apply the resize only after fullscreen is disabled.
-
由 Romain Vimont 提交于
Provide command-line help, with -h/--help option.
-
由 Romain Vimont 提交于
The long option is --max-size, so for consistency, adapt the code accordingly.
-
- 01 2月, 2018 7 次提交
-
-
由 Romain Vimont 提交于
In addition to the short form (e.g. "-p"), add the long form ("--port").
-
由 Romain Vimont 提交于
For readability, indent "case" in switch blocks. Replace: switch (x) { case 1: // ... case 2: // ... case 3: { // a local scope block int i = 42; // ... } } By: switch (x) { case 1: // ... case 2: // ... case 3: { // a local scope block int i = 42; // ... } }
-
由 Romain Vimont 提交于
Use the ADB environment variable to provide a custom adb path.
-
由 Romain Vimont 提交于
Replace screenrecord execution by manual screen encoding using the MediaCodec API. The "screenrecord" solution had several drawbacks: - screenrecord output is buffered, so tiny frames may not be accessible immediately; - it did not output a frame until the surface changed, leading to a black screen on start; - it is limited to 3 minutes recording, so it needed to be restarted; - screenrecord added black borders in the video when the requested dimensions did not preserve aspect-ratio exactly (sometimes unavoidable since video dimensions must be multiple of 8); - rotation handling was hacky (killing the process and starting a new one). Handling the encoding manually allows to solve all these problems.
-
由 Romain Vimont 提交于
Never miss an exception by using an uncaught exception handler.
-
由 Romain Vimont 提交于
Move argument parsing to a separate method.
-
由 Romain Vimont 提交于
Replace our custom Point class by android.graphics.Point.
-
- 30 1月, 2018 1 次提交
-
-
由 Romain Vimont 提交于
To simplify the device server-side build, use gradle to create an APK, even if we use it as a simple jar, by running its main() method.
-