mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #126] xgameruntime: XUserFindForDevice answers E_GAMEUSER_USER_NOT_FOUND until XUserAddAsync (RT-382) #178
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#178
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/126
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9860📝 Commits (1)
b18da3dxgameruntime: XUserFindForDevice answers E_GAMEUSER_USER_NOT_FOUND until XUserAddAsync (RT-382)📊 Changes
4 files changed (+40 additions, -7 deletions)
View changed files
📝
docs/runtime_imports.md(+5 -2)📝
runtime/shims/xgameruntime_offline.cpp(+9 -1)📝
runtime/shims/xgameruntime_user.cpp(+8 -0)📝
runtime/test/xgameruntime_offline_test.cpp(+18 -4)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Resubmission of
#5166(closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts.Claimed in the coordination issue as: RT-382, https://github.com/ItsNotRexed/Leonida/issues/5156#issuecomment-7095909064 (found by
@Roberto0953)What and why
XUserFindForDevice(XUserDeviceImpl slot 3,device_find_userinruntime/shims/xgameruntime_offline.cpp) handed out anXUserHandlebefore the title had calledXUserAddAsync. The GDK reference says it "cannot return a user handle to a user that hasn't been signed in with a call to XUserAddAsync". A title that probes its devices before signing in saw a user it never added, which can change its first-boot sign-in flow.xgameruntime_user.cpp: an atomic flag, set whenXUserAddAsynccompletes (and when the local user is added by id), exposed to the other shim asxgameruntime_user_was_added().device_find_user: before the flag is set it writes no handle and answersE_GAMEUSER_USER_NOT_FOUND(0x89245104, the code the user shim already uses); after it, the handle as before.docs/runtime_imports.md: the "Devices" paragraph states the rule.Tested
Windows 11, MSVC 19.44 + Ninja, RelWithDebInfo.
xgameruntime_offline_test: passes 32/32 checks (fails 4 of 32 on merge base).ctest -R xgameruntime: 8/8 passed.@shdann,@gertify,@Atomic258,@searyecheesepeacefulon#5166.Synthetic probes only; no game data.
AI-assisted: yes
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.