Commit Graph
237 Commits
Author SHA1 Message Date
Adrià cc7b82ac6f Merge pull request #12702 from MarcZX10/feat/overlay-pad-status
feat(overlay): show controller status on demand or on connect, disconnect and battery drop
2026-10-30 13:05:28 +01:00
Adrià e7529df44e Merge pull request #12996 from JJenkx/windows/diagnostics-unicode-paths
fix(diagnostics): open VideoOut telemetry and sampler files under any Unicode path on Windows
2026-10-30 10:55:46 +01:00
Adrià 65df5a3630 Merge pull request #13008 from relativespace2K/feat/videoout-cursor-set2x-magnify
feat(libSceVideoOut): export sceVideoOutCursorSet2xMagnify
2026-10-30 10:42:00 +01:00
Adrià 7d4006607a Merge pull request #11196 from p3n1cillin/claude/videoout-unregister-busy
fix(libSceVideoOut): refuse to unregister the buffer set on screen as the console does
2026-10-30 06:21:30 +01:00
MarcZX10 f656845051 feat(videoout): build the pad snapshot only while the panel is wanted
PadInput hands its provider to the display's poll on every update
instead of building and comparing a snapshot itself, so with
ANYPS5_PAD_STATUS unset or 0 and no request an update no longer copies
controller names or reads SDL_JoystickCurrentPowerLevel. A press of the
ShowPadStatus key polls at once, so the panel lists the controllers
from its first frame.
2026-10-30 05:55:09 +01:00
MarcZX10 a25d9e0b7c feat(videoout): report controller status to the pad status panel
PadInput remembers each slot's SDL controller type and name when it
opens the controller, and on every update reads the slot's connection
and SDL_JoystickCurrentPowerLevel through a PadStatusProvider. Only a
changed snapshot is handed to the pad status display, so an idle loop
takes no lock; hot-plug events reach it on the next update. A press of
the ShowPadStatus key in the game window asks the display to show the
panel. PadInput is no longer copyable, as its provider refers to it.
2026-10-30 05:54:56 +01:00
MarcZX10 7b8939999c feat(videoout): map SDL controller types and power levels to pad status
PadKindFromSdl and PadPowerFromSdl turn SDL's game controller type and
joystick power level (SDL_JoystickCurrentPowerLevel: unknown, empty,
low, medium, full, wired) into the pad status types. SDL_JOYSTICK_POWER_MAX
is the enumeration's bound, not a level, and reads as unknown, like any
value outside the enumeration. They are plain functions of the enums,
so tests need neither an SDL subsystem nor a device.
2026-10-30 05:54:47 +01:00
MarcZX10 9d2beb0084 feat(input): add the ShowPadStatus keyboard action
A rebindable keyboard action, F9 by default, that asks for the
controller status panel. F9 is the first free function key: F7, F10,
F11 and F12 are bound by default and no default keyboard-to-pad binding
uses it. Like ToggleFullscreen, TogglePerformanceOverlay and Screenshot
it accepts only keyboard keys, fires once per press (not on key repeat)
and does not press any pad button.

The input mapper's catalogue gets the action, its F9 default and its
keyboard-only restriction, and its existing source-contract tests list
it, since they compare the actions, restrictions and built-in bindings
with the native files.
2026-10-30 05:54:47 +01:00
Adrià 086adee5e3 Merge pull request #12379 from MarcZX10/feat/msgdialog-overlay
feat(overlay): show PS5 system dialogs as real PC dialogs
2026-10-30 02:04:23 +01:00
Adrià 7a225bb303 Merge pull request #12686 from MarcZX10/feat/pad-rumble-intensity
feat(libSceVideoOut): add ANYPS5_RUMBLE to scale or turn off host controller vibration
2026-10-29 23:46:17 +01:00
mrph28 6a2c3e7d99 feat(libSceVideoOut): export sceVideoOutCursorSet2xMagnify
PC5 (PPSA11018) imports the NID and the library did not export it, so the converted executable stopped at load with error 127. The call validates the handle and index like the other cursor calls and returns 0: no cursor image is drawn, so the magnification has no observable effect. The unmeasured behaviour is recorded under Silent stubs.
2026-10-29 17:54:07 -03:00
JJenkxandClaude Opus 5.5 74ec7311f1 fix(diagnostics): open VideoOut telemetry and sampler files under any Unicode path on Windows
APS5_VIDEOOUT_TELEMETRY_DIR, APS5_SAMPLE_THREADS, APS5_SAMPLE_WORKER and
APS5_SAMPLE_COMMITTER were read with getenv and opened with the narrow
fopen/ofstream, so on Windows they worked only for characters in the
ANSI code page, and the tests, which pass UTF-8 path.string() values,
failed whenever %TEMP% was not ASCII.

They are now read with _wgetenv and carried as UTF-8, as the other
diagnostic directories (ANYPS5_SCREENSHOTS, APS5_DUMP_SUBMITS,
APS5_PAD_INPUT_FILE) already are, and the files are opened through
std::filesystem::path. The worker sampler test sets its variables with
_wputenv_s and reads the results through std::filesystem::path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:26:10 -04:00
MarcZX10 0e32c5a792 feat(libSceVideoOut): release the title's mouse buttons once when a dialog starts taking clicks
When the first button event arrives while a modal dialog captures input, MouseInput
publishes a button reset instead of it and drops every press and release until
the dialog is gone, so a button the title saw pressed before the dialog opened
does not stay pressed when its release is dropped.
2026-10-29 14:06:13 +00:00
MarcZX10 8c0fda8ce1 feat(libSceVideoOut): keep mouse button presses from the title while a dialog is shown
MouseInput drops a button press while a modal dialog captures input, so the click
that answers the dialog is not also delivered to the title. Releases still reach
it in this commit.
2026-10-29 14:06:13 +00:00
MarcZX10 e4034b2f89 feat(libSceVideoOut): keep mouse motion and wheel from the title while a dialog is shown
MouseInput drops relative motion and wheel steps while a modal dialog captures
input, so moving or scrolling to answer the dialog does not also move the title's
cursor. Button events are unchanged by this commit. video_out_mouse_tests links
libSceIme for the dialog tests that follow.
2026-10-29 14:06:13 +00:00
MarcZX10 73e6580767 feat(libSceVideoOut): release the title's keys once when a dialog starts taking keys
When the first key event arrives while a modal dialog captures input, KeyboardInput
publishes a key reset instead of it and then drops every key press and release
until the dialog is gone, so a key the title saw pressed before the dialog opened
does not stay pressed when its release is dropped.
2026-10-29 14:06:13 +00:00
MarcZX10 35599e971d feat(libSceVideoOut): keep key presses from the title's keyboard while a dialog is shown
KeyboardInput no longer publishes a key press to libSceKeyboard while a modal dialog
captures input, so the keys that answer the dialog are not also typed into the
title. Key releases still reach it. keyboard_tests links libSceIme because it
builds KeyboardInput.cpp itself.
2026-10-29 14:06:13 +00:00
MarcZX10 a30f2a2fc8 feat(libSceVideoOut): keep pad and key presses from the title while a dialog is shown
While a modal dialog captures input, the controller hand-off that already serves
an IME keyboard publishes slot 0's buttons and left stick to the dialog and
returns the neutral intercepted state to the title, and the button held when the
dialog closes stays hidden until it is released. Key presses, mouse button
presses, wheel steps and motion no longer reach the keyboard-to-pad mapping while
the dialog is shown; releases still do, so no mapped button stays pressed.
2026-10-29 14:06:13 +00:00
MarcZX10 71cd480ce2 feat(libSceVideoOut): drive a modal dialog from the keyboard and the mouse
DialogInput turns window events into modal dialog inputs: Left, Up, Right, Down,
Tab and Shift+Tab and the mouse wheel move the focus, Enter, the keypad Enter and
Space and a left click confirm, Escape and a right click cancel. Repeats of the
confirming and cancelling keys, other windows' events and other keys are
ignored. The presentation thread feeds it with the events it already polls for
the IME text input.
2026-10-29 14:06:13 +00:00
MarcZX10 e77ad1da30 feat(libSceVideoOut): hand the pending modal dialog to the presenter
The presentation thread registers itself as a modal dialog presenter while its
window exists and withdraws on exit, so a dialog opened with no window to show
it is refused and keeps its caller's own answer. Before each flip it reads the
pending dialog and passes it to the driver, or clears it. The IME keyboard keeps
the overlay: while it is shown or captures the keyboard or the pad, the dialog
is not read.
2026-10-29 14:06:13 +00:00
Dean ca6987de8a Merge pull request #11414 from p3n1cillin/claude/videoout-register-past-last-buffer
fix(libSceVideoOut): return INVALID_VALUE for a registration past the last buffer as the console does
2026-10-30 03:00:15 +13:00
p3nicillinandClaude Opus 5.5 ecadb6068a fix(libSceVideoOut): refuse the on-screen unregister on the main bus only
EVO Player and Prospero Win measured RESOURCE_BUSY on ports opened on
bus type 0. The overlay bus is unmeasured, so its on-screen set is
still released as before, which video_out_flip_overlay relies on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:18:02 +00:00
p3nicillinandClaude Opus 5.5 5768bc971f fix(libSceVideoOut): refuse to unregister the buffer set on screen
The console answers RESOURCE_BUSY (0x80290009) when the set holding
the buffer on screen is unregistered, and the set stays registered:
EVO Player measured it with a re-registration then failing
SLOT_OCCUPIED, and Prospero Win on firmware 12.02 after its flips went
idle. The set was released and 0 returned instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 12:18:02 +00:00
Adrià b9246db364 Merge pull request #11853 from ionut27001/fix/wf-videoout-flipmaster-measured-codes
fix(libSceVideoOut): answer the flip-master calls as measured on a PS5
2026-10-29 12:57:56 +01:00
MarcZX10 10a6d9bb0e feat(libSceVideoOut): scale host controller rumble by ANYPS5_RUMBLE
The motor rumble and the trigger rumble of non-DualSense controllers reach SDL with the amplitude a title asked for and no host-side way to reduce or disable it. Build both commands through the rumble intensity helper: at the default of 100 the command is the one built before, and at 0 the host only ever receives a stop. The variable is read when the pad input starts, so an invalid value stops the game there. Vibration that a title plays as audio and that falls back to motor rumble goes through the same path and is scaled with it. DualSense adaptive trigger effects are left untouched.
2026-10-29 02:06:36 +00:00
p3nicillinandClaude Opus 5.5 cce9311f34 fix(libSceVideoOut): answer 0 and UNAVAILABLE_OUTPUT_MODE when the output has no 120 Hz
PS5_Vulkan measured on a base PS5 set to 1080p output that
sceVideoOutIsOutputSupported(15) answers 0, neither 1 nor an error, and
that sceVideoOutConfigureOutput(15) then returns 0x80290019, in a title
declaring high-frame-rate output. A host display below 120 Hz answered
0x80290016 to both instead. Titles that branch on the answer being 1
are unchanged; the undeclared-title answer stays 0x80290016.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 13:48:19 +00:00
p3nicillinandClaude Opus 5.5 338ea713f2 fix(libSceVideoOut): return INVALID_VALUE for a registration past the last buffer
PS5_Vulkan measured on a PS5 (firmware 13.40) that
sceVideoOutRegisterBuffers2 refuses a set at buffers 15 to 19 with
0x80290001. The call threw instead. The other out-of-range arguments
keep throwing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 13:48:15 +00:00
Dean 2227f13661 Merge pull request #11516 from Lindamea1/fix/videoout-event-getters-invalid-event
fix(libSceVideoOut): return INVALID_EVENT from the event getters for an event of another filter
2026-10-29 00:35:41 +13:00
Adrià a37797da92 Merge pull request #11637 from B-Howell/codex/videoout-display-index-current-main
feat(libSceVideoOut): allow selecting the initial display
2026-10-28 03:49:48 +01:00
ionut27001 7af0c1dc60 fix(libSceVideoOut): answer flip-master calls only on a handle that never had buffers 2026-10-27 14:40:31 +02:00
ionut27001 5b1ddb48e3 fix(libSceVideoOut): answer the flip-master calls as measured on a PS5 2026-10-27 14:40:31 +02:00
Adrià d410ce253f Merge pull request #11207 from EagleBearerYS/feat/imedialog-pad-keyboard
feat(libSceImeDialog): type with the controller on an on-screen keyboard
2026-10-27 12:00:58 +01:00
B-Howell be358dc3f7 feat(libSceVideoOut): allow selecting the initial display 2026-10-27 11:50:06 +01:00
Adrià 5c356f41c3 Merge pull request #11048 from imellag/feat/libkernel-macos-main-thread
feat(libkernel): start the guest off the main thread on macOS
2026-10-27 08:27:20 +01:00
Yunus Shaikh dc209521ed feat(agc): draw the system keyboard over the presented frame 2026-10-27 05:20:10 +01:00
Yunus Shaikh 2a3cd39882 feat(libSceVideoOut): hand the pad to an open keyboard and hold back the game's reads 2026-10-27 05:19:49 +01:00
Dean e55c69f1fd Merge pull request #8927 from ionut27001/fix/videoout-cursor-flip-status
fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5
2026-10-27 14:57:01 +13:00
Dean b7cfbf0115 Merge pull request #9346 from Techx3/feat/fullscreen-env
feat(libSceVideoOut): open the display window fullscreen with ANYPS5_FULLSCREEN
2026-10-27 10:29:49 +13:00
Lindamea1andClaude Opus 5.5 0f871ec673 fix(libSceVideoOut): return INVALID_EVENT from the event getters for an event of another filter
sceVideoOutGetEventId, sceVideoOutGetEventData and sceVideoOutGetEventCount
threw for an event whose filter is not EVFILT_VIDEO_OUT, and
sceVideoOutGetEventId also threw for a VideoOut id this library never
registers. A title that asks for the id of each event in a queue that
also holds other events stopped there. PPSA28180 compares the result
with VIDEO_OUT_ERROR_INVALID_EVENT, as reported in #11376 (item 6).

They return VIDEO_OUT_ERROR_INVALID_EVENT (0x8029000D) instead, before
sceVideoOutGetEventData writes its output, as the PS4 libraries of
shadPS4 and fpPS4 do. The id is compared in full, so an id above 32
bits is no longer read as a registered one. A null pointer still
throws. The PS5 result is unverified and recorded in the libSceVideoOut
debt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 17:42:26 +00:00
Dean Galvin 231bbbce92 Merge branch 'main' into fix/videoout-cursor-flip-status 2026-10-27 04:20:52 +13:00
Emanuele b05ca4e4bf fix(libSceVideoOut): read the window size after a flip on the main thread on macOS 2026-10-26 12:07:59 +01:00
orezraeyandClaude Opus 5.5 f34c280578 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 03:06:04 -03:00
orezraeyandClaude Opus 5.5 655d0f3f32 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:51:50 -03:00
Dean Galvin 0a52fdf083 Merge branch 'main' into videoout-color-space-wrappers 2026-10-26 10:30:44 +13:00
Emanueleandmugurc 30cc4ea2e6 feat(libkernel): start the guest off the main thread on macOS
AppKit, which SDL uses for windows, Metal surfaces, event pumping and game
controllers, works only on the main thread, and a guest never hands its
thread back. The macOS relinker emits a call to Aps5StartGuest as the
entry of a relinked executable; no library provided it.

- Aps5StartGuest runs the guest entry on a new thread with the stack size
  of the main thread (at least 8 MiB) and serves the main dispatch queue
  from the run loop of the main thread. The guest ends the process with
  exit; a guest entry that returns aborts.
- Aps5RunOnMainThread runs a function on the main thread and waits for it,
  or in place where the main thread is the caller or Aps5StartGuest was
  never called.
- libSceVideoOut sends its SDL calls through OnMainThread, which carries
  the exceptions back to the caller: the initialisation and shutdown of the
  video and game controller subsystems, the window, its Vulkan surface and
  drawable size, the event polling and the pad, mouse and keyboard input,
  which are created and destroyed there. On the other platforms the
  functions run in place.
- The flip test starts its tests through Aps5StartGuest on macOS, as a
  relinked guest does.

Co-authored-by: mugurc <[email protected]>
2026-10-25 16:02:42 +01:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
SlugZero 58a1bcc5a3 feat(pad): support up to 4 controllers with dynamic user discovery
- Track up to 4 pad slots in libScePad with per-slot inputs, outputs, sensor fusion, and deadbands
- Support dynamic user login/logout events and multi-user registration in libSceUserService
- Map SDL controllers 0-3 to Players 1-4 in libSceVideoOut while preserving Player 1 keyboard and mouse composition
- Add test coverage for multi-controller pads and multi-user services
2026-10-24 19:21:15 +02:00
ionut27001 983a81d91b fix(libSceVideoOut): add APS5_OUTPUT_RESOLUTION to override the reported output resolution 2026-10-24 12:42:14 +02:00
ionut27001 bfeeed4ef4 fix(libSceVideoOut): report the output resolution from the host display as measured on a PS5
sceVideoOutGetOutputStatus derived resolution from the size of the
registered buffers, so a title that reads it right after sceVideoOutOpen
got 1 (1080p) whatever the display. In a payload process on a PS5
(firmware 12.70), with no buffer registered, the field changed with the
console's resolution setting: 2 with it on Automatic on a 4K display, 1
with it set to 1080p. Read it from the display mode SDL reports for the
window's display, next to the refresh rate, and keep it independent of
the registered buffers.
2026-10-24 12:42:08 +02:00
orezraeyandClaude Opus 5.5 ded043d552 feat(videoout): composite the overlay bus over the main output
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:43:21 -03:00