Conversation
Before the first mode install writes to the Steam root, snapshot the pre-existing files (dwmapi.dll, xinput1_4.dll, opensteamtool.toml) into %AppData%\LuaToolsGui\backups with a SHA-256 manifest; the snapshot is never overwritten by later installs. A "Revert to vanilla Steam" card on the Mode page then undoes every mode artifact: closes Steam, restores backed-up files (hash-verified, corrupt copies are discarded rather than propagated), removes mode payloads (OpenSteamTool.dll, cloud_redirect.dll, opensteamtool.toml), optionally cleans game luas and pinned manifests, clears the selected mode, and restarts Steam. Installs made before backups existed (no snapshot available) revert by deleting the mode-placed proxy DLLs — steam.exe falls back to the real system DLLs, so removal is the correct revert there. Revert is offered whenever mode artifacts are present, backup or not. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a safe, explicit way to undo a mode install and return Steam to its pre-LuaTools state.
Backup (automatic, one-time)
dwmapi.dll,xinput1_4.dll,opensteamtool.toml) are snapshotted to%AppData%\LuaToolsGui\backups\with amanifest.jsonrecording each file's SHA-256.Revert (manual, explicit)
config/stplug-in/*.lua) and pinned manifests (config/depotcache/*.manifest).OpenSteamTool.dll,cloud_redirect.dll,opensteamtool.toml— only where no backup covers them) → clear the selected mode → restart Steam → toast with the result.No-backup path (installs made before this feature existed)
steam.exeloads the real system DLLs from System32. The card's status line explains which path applies.Why
Switching modes is covered today, but there's no way to fully opt out again. This gives users a clean exit ramp, and the one-time snapshot means even a botched first install can be undone byte-for-byte.
Testing
dotnet build— 0 warnings, 0 errorsdotnet test— 238/238 passed (on top of the currentmain)Happy to adjust UX (card placement, wording, whether the optional cleanups should default on) or split the backup into its own commit if you prefer.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com