Commit Graph

17 Commits (d50ecf40b603f8a0e5a73699babce7301c0bd870)

Author SHA1 Message Date
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 dfd0707a29 Move utilities to util/ 5 years ago
Romain Vimont a90ccbdf3b Add option to change the push target
A drag & drop always pushed the file to /sdcard/.

Add an option to customize the target directory.

Fixes <https://github.com/Genymobile/scrcpy/issues/659>
5 years ago
Romain Vimont 056e47e752 Replace "cannot" by "could not" 5 years ago
Romain Vimont 073181b294 Use cbuf for file handler request queue
Replace the file_handler_request_queue implementation by cbuf.
5 years ago
Romain Vimont 507b0bcccf Fix memory leak on error
The variable condition was not destroyed on strdup() failure.
5 years ago
Romain Vimont a41dd6c79f Make owned filename a pointer-to-non-const
The file handler owns the filename string, so it needs to free it.
Therefore, it should not be a pointer-to-const.
5 years ago
Romain Vimont c3779d8513 Make owned serial a pointer-to-non-const
The file handler owns the serial, so it needs to free it. Therefore, it
should not be a pointer-to-const.
5 years ago
Romain Vimont b3bd5f1b80 Remove useless casts to (void *) 5 years ago
Romain Vimont dfed1b250e Replace SDL types by C99 standard types
Scrcpy is a C11 project. Use the C99 standard types instead of the
SDL-specific types:

    SDL_bool -> bool
    SintXX   -> intXX_t
    UintXX   -> uintXX_t
5 years ago
Romain Vimont aeda583a2c Update code style
Limit source code to 80 chars, and declare functions return type and
modifiers on a separate line.

This allows to avoid very long lines, and all function names are
aligned.

(We do this on VLC, and I like it.)
5 years ago
Romain Vimont 536b31829a Separate multi-words filenames by '_'
Rename foobar.ext to foo_bar.ext.

<https://github.com/Genymobile/scrcpy/pull/226#discussion_r209454865>
6 years ago
Romain Vimont 6581f9feb9 Make request_queue functions static
These functions are local to file_handler.c.
6 years ago
Romain Vimont 359685b1db Simplify SDL_assert() calls
SDL_assert() already prevents "unused variable" warnings.
6 years ago
Romain Vimont 4527be4cde Add missing include config.h
When config.h is not included, BUILD_DEBUG is not set.
6 years ago
npes87184 66f45f9dae Support drag&drop a file to transfer it to device
Signed-off-by: npes87184 <npes87184@gmail.com>
6 years ago
npes87184 aa97eed24b installer -> file_handler
Signed-off-by: npes87184 <npes87184@gmail.com>
6 years ago