user: make the local profile configurable #347

Manually merged
github merged 1 commit from gh-pr/347/head into gh-pr/347/base 2026-11-26 09:17:05 +00:00
Owner

@⁠Techx3 on GitHub · 2026-08-28 19:34 UTC · original
Techx3:techx3/configurable-local-user → main · +108 −42 · 10 files · 1 commits · merged 2026-08-29 00:27 UTC

Summary

  • add validated --user-id and --user-name options for the emulator's single local profile
  • use that profile consistently in UserService, Pad, and LoginDialog
  • return existing UserService ABI errors for null pointers, unknown users, and short name buffers instead of terminating the emulator
  • reset login-event state on initialization and make one-shot event delivery thread-safe

Why the consumers are included

The original KytyTouche change configured UserService but left Pad validation and LoginDialog on the hard-coded ID 1000. A title that requested the ID returned by UserService could therefore be rejected by Pad. This PR keeps those three local-profile consumers consistent while preserving the default ID and name.

Behavior

  • defaults remain 1000 and Kyty
  • --user-id accepts positive signed 32-bit values
  • --user-name accepts 1-255 UTF-8 bytes; guest output still requires room for the null terminator
  • an explicit LoginDialog focus continues to override the configured default
  • the system remote-control Pad identity (0xff) is unchanged

No new ABI values or SDK contracts are introduced; the implementation uses the UserService error constants already present in the project. This PR is independent from the other Techx3 PRs.

Validation

  • dedicated user_service_tests Release build: passed
  • direct user_service_tests.exe: passed
  • ctest --test-dir _Build/launcher-usability -C Release -R "^user_service$" --output-on-failure: 1/1 passed
  • full kyty_emulator Release build with clang-cl: passed
  • CLI smoke test: valid ID/name exits 0 in help mode; ID 0 is rejected with exit 1

The integration test resolves the actual registered exports and covers initial user, login list, one-shot event/reset, user name buffer handling, user number, game presets, all accessibility getters, Pad validation, and LoginDialog selection.

Provenance

This isolates and refines the configurable UserService work from the KytyTouche runtime-compatibility branch. Original authorship is retained through the commit co-author trailer.

**@⁠Techx3** on GitHub · 2026-08-28 19:34 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/347) `Techx3:techx3/configurable-local-user` → `main` · +108 −42 · 10 files · 1 commits · merged 2026-08-29 00:27 UTC ## Summary - add validated `--user-id` and `--user-name` options for the emulator's single local profile - use that profile consistently in UserService, Pad, and LoginDialog - return existing UserService ABI errors for null pointers, unknown users, and short name buffers instead of terminating the emulator - reset login-event state on initialization and make one-shot event delivery thread-safe ## Why the consumers are included The original KytyTouche change configured UserService but left Pad validation and LoginDialog on the hard-coded ID `1000`. A title that requested the ID returned by UserService could therefore be rejected by Pad. This PR keeps those three local-profile consumers consistent while preserving the default ID and name. ## Behavior - defaults remain `1000` and `Kyty` - `--user-id` accepts positive signed 32-bit values - `--user-name` accepts 1-255 UTF-8 bytes; guest output still requires room for the null terminator - an explicit LoginDialog focus continues to override the configured default - the system remote-control Pad identity (`0xff`) is unchanged No new ABI values or SDK contracts are introduced; the implementation uses the UserService error constants already present in the project. This PR is independent from the other Techx3 PRs. ## Validation - dedicated `user_service_tests` Release build: passed - direct `user_service_tests.exe`: passed - `ctest --test-dir _Build/launcher-usability -C Release -R "^user_service$" --output-on-failure`: 1/1 passed - full `kyty_emulator` Release build with clang-cl: passed - CLI smoke test: valid ID/name exits 0 in help mode; ID `0` is rejected with exit 1 The integration test resolves the actual registered exports and covers initial user, login list, one-shot event/reset, user name buffer handling, user number, game presets, all accessibility getters, Pad validation, and LoginDialog selection. ## Provenance This isolates and refines the configurable UserService work from the KytyTouche runtime-compatibility branch. Original authorship is retained through the commit co-author trailer.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:17:05 +00:00
github manually merged commit ce121d0995 into gh-pr/347/base 2026-11-26 09:17:05 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.