save_patches always emitted the address element as fmt::format("0x%.8x"),
but for move_file and hide_file that element is a VFS path: load() keeps the
text in original_offset and skips u32 validation for those two types.
Round-tripping such a patch through save_patches replaced the source path
with 0x00000000.
The entry stays syntactically valid and keeps loading, so the patch is still
listed and can still be toggled in the Patch Manager while silently matching
no file. Re-downloading does not repair it either, since append_patches
discards an incoming patch whose Patch Version is not strictly greater.
Gate the emit on patch_type_uses_hex_offset, the predicate that already
existed for this and was used only on the load side. The numeric branch
keeps using offset rather than original_offset on purpose: an address
modifier is folded into offset at load time and the flat form emitted here
has nowhere to put it.
Co-Authored-By: Claude Opus 5 <[email protected]>
save_patches opened the target with fs::rewrite (write + create + trunc),
then discarded the result of file.write() and returned true unconditionally.
A write that fails part way leaves a truncated file, load() rejects the
whole file on a parse error, and import_patches refuses to write when
load() fails, so every later import returns -1 with no in-app recovery.
75e66ab5e made the patch config and the pad config atomic but missed this
function; save_config, 70 lines up in the same file, already writes through
fs::pending_file and checks the result. Do the same here.
Co-Authored-By: Claude Opus 5 <[email protected]>
Adreno waves are 64 lanes, and a workgroup narrower than the wave does not pack
together with its neighbours -- it occupies a whole wave and masks the surplus
lanes off. At 32 that idled half of every wave on every dispatch, and these
kernels run on every texture upload of a kilobyte or more, plus every deswizzle
and detile.
Nothing argues the other way here. The kernels carry no shared memory and no
barriers, so group size is a scheduling hint with no LDS or synchronisation
cost to trade against.
- PKG entry paths are converted to std::filesystem::path through explicit UTF-8 (utf8_to_wchar / wchar_to_utf8) instead of the narrow constructor, which read the bytes in the host ANSI code page and terminated the process on any it could not map (Shift-JIS file names such as s10c3_R126_<90 AC 91 CC>.mdat in Darkside Chronicles).
- The canonical path is converted back with UTF-8 as well, so a dev_hdd0 path with non-ASCII characters yields a valid key and passes the containment check (upstream rejected every entry as "escapes installation directory").
- The installation directory is canonicalized without its closing / separators, like every entry: on a file system that cannot resolve it, the lexical form no longer keeps an empty last element that no entry can match (network drives).
- Absolute / . / .. checks run on the raw name bytes via a shared leaves_directory() helper; the .. case is now an installation failure instead of an emergency exit.
- The installation directory name read from the package is validated with the same helper and escaped.
- weakly_canonical is computed once per directory and reused for files not yet on disk (existing paths and folders are still resolved whole): identical keys and verdicts, ~25x faster enumeration (6000 files: 1.7 s → 63 ms).
- Supersedes *19463 (trailing separator after the lexical fallback)
- Supersedes *19492
- Minor: map key moved instead of copied.
The `InstCombine` is a very important pass for optimizing common expressions and simplifying logic. It could help produce sustainably better code at little cost.
This change really is the last straw I've had with Homebrew, I simply cannot trust that they won't do something similar to Apple Silicon in the future. Inevitably much of the Intel CI's downloaded deps will get built from source due to this which would cause build times to skyrocket, were we to keep using Homebrew.
Infamous 2 displays infamous 1 trophy data in overlay if trophies are
present on local user account. If infamous 1 trophies are not present,
the overlay does not display any trophy data.
This code addition sets the trophy name list once (if empty) and
prevents future trophy contexts from changing it. The overlay now
displays the proper trophy data for infamous 2.
The emulated G27 was always attached while enabled, so games kept
reading a phantom wheel (centered steering after the previous commit,
formerly hard-left) and ignored pad steering input. Attach the emulated
device only while the mapped steering device is connected: games now
see the wheel plug in and out exactly like on real hardware, and pad
play works without disabling the option and restarting the game.
Also guard the personality reconnect against the device having been
detached between the game's mode-change request and the housekeeping
tick.
Co-Authored-By: Claude Fable 5 <[email protected]>
The emulated G27 fell back to MIN for every axis whose mapped SDL device
was not connected. For the steering axis MIN encodes full-left, so enabling
the emulated wheel without the physical device attached (or while playing
with a regular gamepad) made games receive permanent hard-left steering.
Fall back to the axis' neutral position instead: center for steering,
released for pedals (unchanged behavior for pedals).
Co-Authored-By: Claude Fable 5 <[email protected]>