- Rewrite Patch.ps1 around a read-only pre-flight plan that refuses missing wrappers, wrong wrapper PE architecture, stale or wrapper backups, and a non-NVIDIA file at the original path before anything is changed.
- Use takeown/icacls instead of Set-Acl, record each owner SID and whether an Administrators ACE already existed, and restore both so a temporary unlock is undone on rollback and after a successful move.
- Stage the wrapper as a .nvfbcwrp-tmp copy, verify SHA-256 after every copy and move, and revert recorded copy, move and ACL steps in reverse when any target fails.
- Add -Unattended and -SkipGenuineCheck switches, quote elevation arguments correctly for Windows PowerShell 5.1, and replace pause/Read-Host with explicit exit codes.
- RunPatch.bat confines ExecutionPolicy Bypass to its own process and propagates the exit code; README.md documents the re-run, refusal and manual-restore behavior.
- Target: win/nvfbcwrp
- Delete the note in the 3rd-party software section that pointed users at the Windows key + Ctrl + Shift + B shortcut to quickly reset the graphics driver.
- Leave the registry command and the reboot note as the only steps for enabling NvFBC.
- Target: win/nvfbcwrp
- Add Patch.ps1, which relaunches itself elevated, renames NvFBC64.dll and NvFBC.dll to the NvFBC64_.dll and NvFBC_.dll backups, and copies nvfbcwrp64.dll and nvfbcwrp32.dll into System32 and SysWOW64.
- Grant Administrators ownership and FullControl on each genuine DLL before moving it, and roll back the moves already done when a wrapper is missing or a later step throws.
- Add RunPatch.bat, which requires Patch.ps1 next to itself and starts it with a per-process ExecutionPolicy Bypass.
- Document the scripts in win/nvfbcwrp/README.md and normalize headings, link syntax and blank lines in win/README.md.
- Target: win/nvfbcwrp
patch_common() looked up nvidia-smi and exited with "nvidia-smi utility not found" before checking the manually entered driver version, so -d could not be used on systems without nvidia-smi (e.g. Batocera). Move the lookup into the branch that detects the version, so -d never touches nvidia-smi.
Apply the same change to patch.sh and patch-fbc.sh. Behaviour without -d is unchanged, including the error message when nvidia-smi is missing.
Based on #876 by DTJW92, whose patch.sh change could not be merged as-is.
Co-authored-by: DTJW92 <96082560+DTJW92@users.noreply.github.com>
- Remove the two pCloud Mirror links from the patching tool step. The mirrors duplicate the release downloads and go stale between releases.
- Link the Win_1337_Apply_Patch and Win_1337_Apply_Patch_Powershell READMEs at their usage sections, so readers land on the instructions instead of the top of the file.
- Replace the hardcoded newest-generation -S/-R defaults with auto-detection over a BYTECODE_GENERATIONS table of known NVENC generations, so older drivers resolve without passing patterns explicitly.
- Keep explicit -S/-R arguments, including comma-separated fallback alternatives, working unchanged, and add the legacy x86 pair previously supplied only by legacy.sh.
- Verify an extracted target file actually appeared and fall back between the .dll and .dl_ spellings, since 7z exits 0 when the requested member is absent.
- Require -S and -R together or neither, and fail clearly when no known generation matches exactly once in the target library.
- Add regression tests for bytecode auto-detection, target resolution and argument validation, and update the README flag defaults.
- Target: autopatch
- Replace -vsync 0 with per-output -fps_mode passthrough (requires FFmpeg 5.1 or newer).
- Limit the input with testsrc=d=50 instead of "-t 50" after -i, which only limited the first output so the other encodes never terminated.
- Allow selecting the ffmpeg binary through the FFMPEG variable.
parse_args() stores -7/--7zip in args.sevenzip, but main() never passed it to patch_flow(), so extraction always used the default "7z" and failed with FileNotFoundError when 7z is not on PATH. Forward sevenzip=args.sevenzip.
- Accept comma-separated fallback alternatives in -S/--search and -R/--replacement; alternatives are tried in order and the first one found in the binary is used.
- Check uniqueness only for the selected alternative.
- Validate that every search/replacement pair has equal length and reject empty alternatives.
- Narrow the download error handling to urllib.error.URLError and raise UnknownPlatformException when ProductType is missing in setup.cfg.
* win: fix patch-tester
updates ffmpeg command as per documentation
* win: fix patch-tester ffmpeg command
Replaces testsrc with testsrc2 for correct pixel format for latest ffmpeg
Fixes position of duration parameter `-t`
Adds cuda:0 to explicitly select the first CUDA device
* win: change patch-tester input duration
Uses the duration(d) parameter for the source instead of generic option '-t'
Changes source's duration to 150s (2:30 minutes) so that encoding output is shown longer