MoltenVK has no robustBufferAccess2, so a robust read past the end of a
pooled buffer is clamped into its slot instead of returning zero. A
100-byte buffer placed in a 256-byte slot then read the bytes an earlier
user left there (0xabababab), and agc_driver_pooled_buffer_range failed.
On macOS, when a host-coherent mapped slot is handed to a new buffer,
the bytes past the requested size are cleared to zero.
Linux and Windows compile the same code as before.
On macOS:
- ToggleFullscreen reads the window flags and sets fullscreen in one
main-thread call, instead of reading the flags on the presentation thread.
- DisplayWindow records SDL_GetWindowID while creating the window on the main
thread and exposes it as Id(). The mouse, keyboard, IME and pad event
routing compares against it instead of calling SDL_GetWindowID from the
presentation thread.
- SDL_InitSubSystem, PadInput::setMouseMode and MouseInput::UpdateCapture copy
SDL_GetError inside the main-thread call that failed and report that copy,
since SDL error strings are per thread.
logb and logbf returned the host's logb, which sets ERANGE for a zero
argument on Windows and returns signalling NaNs unquieted. The titles'
copies are FreeBSD msun's s_logb.c and s_logbf.c, which set no errno and
quiet a NaN through x * x; both functions now compute that algorithm.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
previous_sequence caught PermissionError and IsADirectoryError and returned 0,
so an unreadable command file was silently overwritten with a restarted
sequence. main() already rejects directory targets, so only FileNotFoundError
is a valid empty start. Cover the unreadable case with a mocked PermissionError,
which needs no chmod and also runs for privileged writers.
Addresses the changes requested in the review of 19.10. and 24.10.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Ensure pad_input writes controller commands with explicit UTF-8 encoding and UNIX LF newlines across all host platforms. Validate that the target path is not a directory and that its parent directory exists before attempting to write.
Move the declaration out of the test's local extern block so GuestPthreadCondSetname uses the shared libkernel API header, like the other pthread_cond exports.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
scePthreadCondInit ignores its name and nothing reads a condition variable name back, so pthread_cond_setname_np now only validates the condition variable and the name. Drops the stale libkernel_sys declaration and moves the debt entry to Silent stubs, citing shadPS4.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Store the name on the condition variable, creating a statically initialized one first, and return EINVAL for a destroyed one. A null cond or a null name throws, recorded in the libkernel debt file.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
MouseInput::UpdateCapture and PadInput::setMouseMode switch SDL's relative
mouse mode, which on macOS warps and hides the cursor through the window, from
the presentation thread. On macOS both now read and set it through
RunOnMainThread.
The presentation thread still queried the SDL window directly on macOS:
SDL_Vulkan_GetInstanceExtensions in windowExtensions, SDL_GetWindowFlags and
SDL_Vulkan_GetDrawableSize in windowDrawableSize, SDL_GetWindowSize after
each flip, and SDL_GetWindowDisplayIndex with SDL_GetCurrentDisplayMode in
updateDisplayRefreshRate. Each now runs through RunOnMainThread on macOS, the
same way window creation, the Vulkan surface and event pumping already do.