You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrcpy/app/src
Romain Vimont e8a565f9ea Fix touch events HiDPI-scaling
Touch events were HiDPI-scaled twice:
 - once because the position (provided as floats between 0 and 1) were
   converted in pixels using the drawable size (not the window size)
 - once due to screen_convert_to_frame_coords()

One possible fix could be to compute the position in pixels from the
window size instead, but this would unnecessarily round the event
position to the nearest window coordinates (instead of drawable
coordinates).

Instead, expose two separate functions to convert to frame coordinates
from either window or drawable coordinates.

Fixes #1536 <https://github.com/Genymobile/scrcpy/issues/1536>
Refs #15 <https://github.com/Genymobile/scrcpy/issues/15>
Refs e40532a376
4 years ago
..
android Remove AINPUT_SOURCE_ANY value 6 years ago
sys Add missing include string.h 5 years ago
util Make scrcpy.h independant of other headers 4 years ago
cli.c Make scrcpy.h independant of other headers 4 years ago
cli.h Move command-line parsing to a separate file 5 years ago
command.c Show a friendly hint for adb installation 5 years ago
command.h Show a friendly hint for adb installation 5 years ago
common.h Accept port range 5 years ago
compat.h Disable X11 compositor bypass 5 years ago
control_msg.c Handle repeating keycodes 4 years ago
control_msg.h Handle repeating keycodes 4 years ago
controller.c Make message buffer static 4 years ago
controller.h Move utilities to util/ 5 years ago
decoder.c Remove unused includes 5 years ago
decoder.h Include config.h everywhere 5 years ago
device.c Move utilities to util/ 5 years ago
device.h Move utilities to util/ 5 years ago
device_msg.c Serialize text size on 4 bytes 4 years ago
device_msg.h Increase clipboard size from 4k to 256k 4 years ago
event_converter.c Handle NumPad events when NumLock is disabled 5 years ago
event_converter.h Add --prefer-text option 5 years ago
events.h Add stream layer 6 years ago
file_handler.c Replace SDL_assert() by assert() 5 years ago
file_handler.h Move utilities to util/ 5 years ago
fps_counter.c Replace SDL_Atomic by stdatomic from C11 5 years ago
fps_counter.h Replace SDL_Atomic by stdatomic from C11 5 years ago
icon.xpm
input_manager.c Fix touch events HiDPI-scaling 4 years ago
input_manager.h Handle repeating keycodes 4 years ago
main.c Make scrcpy.h independant of other headers 4 years ago
opengl.c Enable trilinear filtering for OpenGL 5 years ago
opengl.h Enable trilinear filtering for OpenGL 5 years ago
receiver.c Make message buffer static 4 years ago
receiver.h Move utilities to util/ 5 years ago
recorder.c Make scrcpy.h independant of other headers 4 years ago
recorder.h Make scrcpy.h independant of other headers 4 years ago
scrcpy.c Handle repeating keycodes 4 years ago
scrcpy.h Make scrcpy.h independant of other headers 4 years ago
screen.c Fix touch events HiDPI-scaling 4 years ago
screen.h Fix touch events HiDPI-scaling 4 years ago
server.c Make scrcpy.h independant of other headers 4 years ago
server.h Make scrcpy.h independant of other headers 4 years ago
stream.c Remove unused includes 5 years ago
stream.h Move utilities to util/ 5 years ago
tiny_xpm.c Replace SDL_assert() by assert() 5 years ago
tiny_xpm.h Include config.h everywhere 5 years ago
video_buffer.c Replace SDL_assert() by assert() 5 years ago
video_buffer.h Include config.h everywhere 5 years ago