Skip to content

proot: find tracees by pid, resolve deep paths at once, share clone3 … - #772

Merged
maxjivi05 merged 4 commits into
WinNative-Emu:mainfrom
maxjivi05:feature/proot-enhancements
Sep 25, 2026
Merged

maxjivi05 merged 4 commits into
WinNative-Emu:mainfrom
maxjivi05:feature/proot-enhancements

Conversation

@maxjivi05

Copy link
Copy Markdown
Contributor

…threads' state

Every stop looked its tracee up, and swept for terminated ones, by walking the list of all tracees - one per thread, so hundreds to thousands in a Steam session. Tracees are now hashed by pid, and the sweep runs only after a termination.

Canonicalizing a guest path lstat()ed every component, with an ever longer host path. For a clean path under the rootfs binding alone, the directory holding the last component is now opened once and taken as canonical when the kernel's path for it is the one PRoot would build; anything else walks component by component as before. The final component of a call that does not follow it is no longer lstat()ed, its result was never used.

clone3(2) was unknown, so the threads glibc 2.34+ creates with it got their own copy of the cwd and emulated heap: a chdir() in one thread was invisible to the others. Its flags are now read from struct clone_args.

…threads' state

Every stop looked its tracee up, and swept for terminated ones, by walking
the list of all tracees - one per thread, so hundreds to thousands in a
Steam session. Tracees are now hashed by pid, and the sweep runs only after
a termination.

Canonicalizing a guest path lstat()ed every component, with an ever longer
host path. For a clean path under the rootfs binding alone, the directory
holding the last component is now opened once and taken as canonical when
the kernel's path for it is the one PRoot would build; anything else walks
component by component as before. The final component of a call that does
not follow it is no longer lstat()ed, its result was never used.

clone3(2) was unknown, so the threads glibc 2.34+ creates with it got their
own copy of the cwd and emulated heap: a chdir() in one thread was invisible
to the others. Its flags are now read from struct clone_args.
…nd GameScope pad hotplug

- Touchscreen mode tracks pointers by id and delays the press 50 ms, so a
  second finger starts a two-finger scroll or right-click tap instead of a
  click; cancel and detach release every held button.
- Uncaptured mice move through one path with scaled relative deltas;
  fractional wheel values accumulate into whole notches; captured touchpads
  use position differences.
- Relative mouse mode no longer delivers buttons and wheel twice in Wayland
  sessions.
- D-pad keycodes set the D-pad (they set unused button bits before), and
  controller key repeats no longer move Android focus.
- Guide: a tap reaches the guest (Steam opens its menu), a 2 s hold opens
  the WinNative menu.
- GameScope: pad slots outlive devices, since the guest never learns of a
  pad added mid-game; a disconnect leaves the slot neutral for the next pad.
- fakeinput waits at most 2 ms between ring checks (was 16 ms).
…ing for vsync

Android batches joystick, captured-mouse and touch MOVE events to the next
frame. The display activity now asks for unbuffered dispatch of joystick,
trackball and position sources (re-asserted after focus changes, which reset
it), and the on-screen controls ask for it per gesture when a control takes
the touch.

Measured on a RedMagic in GameScope (uinput write to fakeinput ring):
pad axes 8.7 -> 1.3 ms median, on-screen stick 8.8 -> 0.9 ms median.
Covers the installer's first container and the Containers screen. The
container's audio setting can still be changed afterwards.
@maxjivi05
maxjivi05 merged commit dd0236d into WinNative-Emu:main Sep 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant