summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Michael Crimando <mcriman1@ford.com> 2023-05-22 11:01:17 -0400
committer Antonio Kantek <kanant@google.com> 2024-03-28 10:52:41 -0700
commitb12a749ffda2506a981a133a72a7f2a3098c65f0 (patch)
tree4d1047a0e6f148137681fbfda70c82bd715d3493 /libs/ultrahdr/jpegencoderhelper.cpp
parent9c7dcd3e6b5930738b7d1efec889d1d51ade9ba2 (diff)
Bind an input device via descriptor
These changes solve a problem for systems that have multiple displays as well as 2 or more input devices with the exact same name. (e.g. 2 Xbox Series X controllers will report the exact same device name). Currently the default behavior for overall Android is that input device inputs go towards the last screen that the user touched. On systems where a single computer is used for displaying content to multiple people, this can be a problem. A user may be trying to play a game with a controller on screen 1, while a second user tries to browse the internet on screen 2. If the user on screen 2 touches the screen, it'll keep sending the controller input events to screen 2 instead of the game on screen 1. To fix this, the system can use a function to bind controllers to a display. The system can just find an input device by device name and make sure all inputs from that controller go to the correct display. That ensures that no matter what, the controller inputs go to the desired game on screen 1. Now consider a single system with 2 screens and 2 different users trying to play controller games. User A will want their controller inputs to go to screen 1 and User B will want their controller inputs to go to screen 2. This is possible with the current functionality. That is, unless the controllers have the exact same device name. In that case the controllers can only be locked to one screen or another. Device names are not unique. However, descriptors are unique per device. This would allow the system to uniquely identify each input device and bind them to the correct screen. Descriptors also cover certain scenarios. Such as a keyboard with a track pad built into it. It'll be 2 different input devices with 2 different device names but the same descriptor. Test: Built and run on hardware Test: atest InputTests Bug: 324075859 Signed-off-by: Michael Crimando <mcriman1@ford.com> Change-Id: I27a7268eedc6be9f5423b4b8ca40b8b9728fe18c
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions