Commit Graph
408 Commits
Author SHA1 Message Date
Dean d5ec8e6575 Merge pull request #11854 from ionut27001/fix/wf-videoout-outputstatus-hdr-flags-zero
fix(videoout): report output status flags 0 with HDR output
2026-11-01 23:35:45 +13:00
Dean 5123e463e8 Merge pull request #14215 from angrysandhill/fix/14149-shutdown-regression
fix(tests): exercise no-Vulkan shutdown during DLL teardown
2026-11-01 18:50:58 +13:00
MarcZX10 9421867f14 test(videoout): register the frame limit flip test as video_out_flip_fps_limit
Runs the fps_limit mode with ANYPS5_FPS_LIMIT=20 in its environment, with
the same timeout, skip code and resource lock as the other flip tests.
2026-11-01 01:49:57 +00:00
MarcZX10 858d2c886e test(videoout): pin that ANYPS5_FPS_LIMIT holds the window's flips
Six flips under ANYPS5_FPS_LIMIT=20 may not complete in under five periods
of 50 ms. The check is a lower bound only, so a loaded host cannot fail it;
without the hook the six flips complete in about 100 ms at the output's
rate.
2026-11-01 01:49:57 +00:00
MarcZX10 97a5564fd4 feat(videoout): time the frame-limit wait as its own flip phase
The wait shows as frame_limit in the VideoOut.Flip timing, so a title held
by ANYPS5_FPS_LIMIT is told apart from one held by the vblank wait in the
trace and in the phases of the performance overlay's second page.
2026-11-01 01:49:43 +00:00
MarcZX10 66615554c3 feat(videoout): hold each flip of the window until its frame-limit deadline
With ANYPS5_FPS_LIMIT set, processFlip waits for the pacer's deadline after
the flip's vblank wait and before the frame is presented, so the delay
falls on the presentation and on the flip's completion event, which is
what paces the title. The wait takes no lock, sleeps with PreciseSleepUs in
slices of 20 ms and re-checks between slices whether the output was closed
or failed. The limit is read at the first flip, where an invalid value
stops the title with the error that names it. Without the variable the
pacer does not exist and processFlip does what it did. Flips of the overlay
bus are not paced.
2026-11-01 01:49:43 +00:00
AngrySandhill a568bd9d04 fix(tests): exercise no-Vulkan shutdown during DLL teardown 2026-10-31 20:15:35 -04:00
MarcZX10 a1c1c41ad8 fix(libSceVideoOut): set ANYPS5_PAD_IDENTIFY with _putenv_s on Windows
setenv is not part of the MinGW Windows CRT. The test sets the variable
for the process, which PadIdentify.hpp reads with std::getenv. SDL_setenv
calls SetEnvironmentVariableA on Windows, which does not update the CRT
table that std::getenv reads, so _putenv_s is used there. Linux keeps
setenv.
2026-11-01 00:04:38 +01:00
MarcZX10 d2278b2e37 fix(libSceVideoOut): set the Windows PATH for the identify pad-input tests
Give the four pad_identify_{connect,off,rumble,invalid} entries the same
PATH setup on Windows that pad_sdl has, so the DLLs they link resolve.
2026-11-01 00:04:38 +01:00
MarcZX10 134dfaf410 fix(libSceVideoOut): give the identify pad-input test its own target name
The libScePad scheduler test already defines a target called
pad_identify_tests, so configuring the tree failed with 'another target
with the same name already exists'. The VideoOut test target is renamed
to pad_identify_pad_input_tests; its ctest names are unchanged.
2026-11-01 00:04:38 +01:00
MarcZX10 a626b6f836 test(libSceVideoOut): cover the identify pulse on a virtual controller
Four process-level checks on an SDL virtual controller whose rumble
callback records the motor edges: connect sends exactly one pulse for
player 1 after the quiet window; off sends nothing; a title rumbling
at 200 gets no identify pulse while it rumbles and one pulse after it
stops; an invalid ANYPS5_PAD_IDENTIFY stops the start with an error
naming the variable and the value. The test skips with code 77 when the
host has joysticks, as pad_sdl does.
2026-11-01 00:04:30 +01:00
MarcZX10 ef631376a0 feat(libSceVideoOut): pulse each bound controller with its player number
When ANYPS5_PAD_IDENTIFY is connect or always, a controller that is
bound to a player slot gets a short pulse pattern once the title has
been quiet for 500 ms: one pulse for player 1, two for player 2 and so
on up to four. The scheduler runs in the existing output pass, so a
title's own rumble, its refreshes and its stop always take precedence,
and the pulse is scaled by ANYPS5_RUMBLE. A controller without rumble
support logs one line and gets no pulse. The keyboard and mouse never
get a pulse, since they are not bound to a slot. The mode is read when
the pad input starts, so an invalid value stops the title there. With
the default off, the output pass sends exactly what it sent before.
2026-11-01 00:04:30 +01:00
Adrià 3197f0ad06 Merge pull request #13705 from MarcZX10/fix/pad-port0-connected-state
feat(libScePad): report port 0 as connected only while its controller is present, opt-in with ANYPS5_PAD_PORT0_STATE
2026-10-31 20:50:35 +01:00
Adrià b7d3fd3c52 Merge pull request #13629 from kyon-eth/feat/videoout-320-legacy-exports
feat(libSceVideoOut): declare older callable exports
2026-10-31 11:03:31 +01:00
Adrià d9ef462319 Merge pull request #13616 from SandstromPL/test/videoout-register-flip-modes
test(videoout): register the nine flip-test modes that never ran
2026-10-31 10:26:41 +01:00
MarcZX10 5e1d3c991d fix(libSceVideoOut): give pad_port0 the Windows DLL search path
Match pad_sdl: under WIN32 the test gets an ENVIRONMENT_MODIFICATION that prepends the library directories of libSceVideoOut, libScePad, libSceIme, libSceUserService and libc to PATH, so a plain ctest run can load them. Linux is unchanged.
2026-10-31 06:54:44 +00:00
MarcZX10 3a03e58b31 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state
# Conflicts:
#	core/libs/prx/libScePad/src/PadState.cpp
2026-10-31 06:53:37 +00:00
Adrià 50a261e7e4 Merge pull request #13478 from JJenkx/fix/pad-injected-capture-hold
fix(pad): hold injected buttons that answered a dialog until released
2026-10-31 04:09:53 +01:00
JJenkxandClaude Opus 5.5 2e2f6b5eef fix(pad): expire a held injected button when its scripted press ends
A scripted button that answered a dialog stayed masked from the title
until a title read sampled it released. When the title did not read
during the release, a later scripted press of the same button was
masked as well. The mask now keeps only the buttons the command
timeline held without a break since the last read, so a press that
ends, or a new command, clears it whether or not it was sampled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 20:57:09 -04:00
MarcZX10 672ead67ec test(libSceVideoOut): keep keyboard input out of port 0 while it is withdrawn 2026-10-30 23:48:23 +00:00
MarcZX10 68a4689e62 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state 2026-10-30 23:46:32 +00:00
Adrià 93f5331fd7 Merge pull request #13463 from notHaze/feat/configurable-mouse-stick
feat(input): add configurable mouse stick target
2026-10-30 22:50:29 +01:00
Kyon b0d9058d42 feat(libSceVideoOut): declare configuration mode export 2026-10-30 21:05:16 +00:00
Kyon 9aa490f583 feat(libSceVideoOut): declare older callable exports 2026-10-30 20:21:35 +00:00
SandstromPLandClaude Opus 5.5 57f7b15128 test(videoout): register the nine flip-test modes that never ran
Flip.cpp dispatches 26 modes, but CMake registered 17. present,
backtoback, dcc, pacing, aftergpu, onedevice, deferred and unregistered
now run with the other display tests: they need a Vulkan window and skip
with 77 without one. deferred and unregistered cover flips submitted
before their buffers are registered (c9fe124c10). unavailable expects
sceVideoOutOpen to fail, so it runs under SDL's dummy video driver,
which has no Vulkan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 00:54:48 +05:30
MarcZX10 bc37a818a0 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state
# Conflicts:
#	core/libs/prx/libSceVideoOut/include/PadInput.hpp
2026-10-30 18:52:51 +00:00
MarcZX10 156ca91120 test(libSceVideoOut): check the hold halfway through as well as at its edge
The removal and reconnect checks sampled only at the hold's edge, so a hold
of zero still passed them. A sample halfway through the hold must now stay
pending, which a zero hold does not do.
2026-10-30 18:51:20 +00:00
JJenkxandClaude Opus 5.5 c2a766ec22 fix(pad): hold injected buttons that answered a dialog until released
A scripted press that answers a modal dialog or the IME was merged into
the host state for the capture, but video out's heldThroughCapture only
sees host buttons, so once the capture ended Pad::ReadState OR-ed the
still-active injected press into the title's read. A 400 ms Cross that
answered the dialog then also reached the title for the rest of the
press.

Record port 0's injected buttons while the pad is captured and mask them
from the title until they are released, as host buttons already are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 12:11:50 -04:00
Adrià cca2d08bd2 test(libSceVideoOut): count the three host volume default bindings 2026-10-30 16:29:56 +01:00
Adrià df480a5049 fix(libSceVideoOut): close the pad status request test before the volume tests 2026-10-30 16:29:56 +01:00
Adrià b18234a5fd fix(libSceVideoOut): close the pad status conflicts test before the volume tests 2026-10-30 16:29:56 +01:00
Adrià d09e7a46e9 fix(libScePad): resolve the merge with ShowPadStatus in the volume actions 2026-10-30 16:29:56 +01:00
MarcZX10 f865f48944 fix(libSceVideoOut): stop linking libSceAudioOut
The host volume hooks libSceVideoOut calls now come from libScePad, so libSceVideoOut no longer needs libSceAudioOut. That library links its own static SDL2, and loading it with libSceVideoOut is the dependency the Windows pad_sdl abort points at; the libSceVideoOut link line is back to what main has.
2026-10-30 16:29:55 +01:00
MarcZX10 737bcb8f69 refactor(libScePad): own the shared host volume state
The volume, mute and focus state that libSceAudioOut applies and libSceVideoOut changes now lives in libScePad, which both libraries already link, instead of in libSceAudioOut. The tests that compile the state directly and the environment reference follow the file.
2026-10-30 16:29:55 +01:00
MarcZX10 14b0b4b5f2 refactor(libScePad): move the host volume headers from libSceAudioOut
libSceVideoOut reads and changes the shared host volume state, and linking libSceAudioOut for it puts a second shared library with its own static SDL2 into libSceVideoOut. Both libraries already link libScePad, so the headers that describe that state move there first; the include paths and guards follow.
2026-10-30 16:29:55 +01:00
MarcZX10 a9124c157f test(libSceVideoOut): print the line of the pad_sdl check that fails
Require aborted without saying which check failed, so a failure on a CI host that cannot be reproduced locally left no trace of the assertion in the log. It now prints the source line before aborting.
2026-10-30 16:29:55 +01:00
MarcZX10 7cd80adfd5 feat(libSceVideoOut): read the window's focus once when it first exists
With the option on, a window that opens behind another one starts silent instead of waiting for a first focus event that never comes. With the option off this changes nothing.
2026-10-30 16:29:55 +01:00
MarcZX10 f58d816ad9 feat(libSceVideoOut): remember whether the host focus was read once
A window created without focus sends no focus lost event, so the first update reads the focus itself.
2026-10-30 16:29:55 +01:00
MarcZX10 5bb5ac189b feat(libSceVideoOut): mute the host audio while the window has no focus
The display window's focus events drive the shared host volume. With ANYPS5_MUTE_ON_FOCUS_LOSS unset or 0 they change nothing; with 1 the audio is silent from focus lost until focus gained, and each change prints one line on stderr.
2026-10-30 16:29:55 +01:00
MarcZX10 c2bcf86059 feat(libSceVideoOut): run the volume and mute hotkeys and report them on stderr
The requests are handled only for key events of the display window, like fullscreen, the overlay and the screenshot, and each handled press prints one line with the resulting level or mute.
2026-10-30 16:29:55 +01:00
MarcZX10 41fd68c00a feat(libSceVideoOut): read the host volume settings when video output starts
PadInput applies ANYPS5_VOLUME and ANYPS5_MUTE_ON_FOCUS_LOSS next to the input mapping, so an invalid value stops the game at the same point as an invalid mapping file, with an error naming the variable.
2026-10-30 16:29:55 +01:00
MarcZX10 cb77b10b3d test(libSceVideoOut): cover the focus rule for the host volume
Nothing happens by default, focus lost silences and focus gained restores exactly unity with the option on, other window events, other windows and key events are ignored, and the user's own mute survives a focus round trip.
2026-10-30 16:29:55 +01:00
MarcZX10 0a93f3ae8c feat(libSceVideoOut): follow the display window's focus for the host volume
Only focus lost and gained events of the display window count. Minimizing, restoring, closing and the events of other windows change nothing, and the shared volume only acts on them when the focus option is on.
2026-10-30 16:29:55 +01:00
MarcZX10 addfd6a8ee test(libSceVideoOut): cover turning requests into host volume commands
Register pad_host_volume. An empty request set changes nothing, volume up and down move one step and return to exactly unity, mute toggles, combined requests run up then down then mute, and the other host requests are ignored.
2026-10-30 16:29:55 +01:00
MarcZX10 4cdc503ffb feat(libSceVideoOut): turn volume and mute requests into host volume commands
ApplyHostVolumeRequests runs the requested commands in the order up, down, mute and reports whether there was one, leaving the final state for the caller to print.
2026-10-30 16:29:55 +01:00
MarcZX10 f47834d9e6 build(libSceVideoOut): link libSceAudioOut for the host volume
The volume keys and the focus rule live in the video output's input handling and drive the audio output's shared host volume. libSceAudioOut does not depend on libSceVideoOut.
2026-10-30 16:29:55 +01:00
MarcZX10 93a613aed4 test(libSceVideoOut): cover that the host volume keys collide with nothing
No built-in key is bound twice, the three host volume keys are bound by default as plain keyboard keys, a key the user shares with another action keeps both bindings as it does for the existing actions, and action names are exact and case-insensitive.
2026-10-30 16:29:55 +01:00
MarcZX10 562654de68 test(libSceVideoOut): cover the default ToggleMute binding
F8 is the only built-in ToggleMute key, a mapping line replaces it, the built-in table raises the request, and the key does not reach the pad state.
2026-10-30 16:29:55 +01:00
MarcZX10 67cc1b2888 test(libSceVideoOut): cover the default VolumeUp binding
F6 is the only built-in VolumeUp key, a mapping line replaces it, the built-in table raises the request, and the key does not reach the pad state.
2026-10-30 16:29:55 +01:00
MarcZX10 54e10becde test(libSceVideoOut): cover the default VolumeDown binding
F5 is the only built-in VolumeDown key, a mapping line replaces it, the built-in table raises the request, and the key does not reach the pad state.
2026-10-30 16:29:55 +01:00