mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-26 12:16:34 +00:00
Use Xbox 360 gamepad name
Some games do not work without a known gamepad name. Fixes #5362 <https://github.com/Genymobile/scrcpy/issues/5362> Refs #5623 comment <https://github.com/Genymobile/scrcpy/pull/5623#issuecomment-2525685323> PR #5623 <https://github.com/Genymobile/scrcpy/pull/5623> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
0a09518a49
commit
7418fd0662
8 changed files with 5 additions and 13 deletions
|
@ -174,7 +174,7 @@ public final class UhidManager {
|
|||
ByteBuffer buf = ByteBuffer.allocate(280 + reportDesc.length).order(ByteOrder.nativeOrder());
|
||||
buf.putInt(UHID_CREATE2);
|
||||
|
||||
String actualName = name.isEmpty() ? "scrcpy" : "scrcpy: " + name;
|
||||
String actualName = name.isEmpty() ? "scrcpy" : name;
|
||||
byte[] utf8Name = actualName.getBytes(StandardCharsets.UTF_8);
|
||||
int len = StringUtils.getUtf8TruncationIndex(utf8Name, 127);
|
||||
assert len <= 127;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue