-
-
Notifications
You must be signed in to change notification settings - Fork 227
Add batch DLL swap: select multiple games and apply in one pass #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RafaelHGOliveira
wants to merge
13
commits into
beeradmoore:main
Choose a base branch
from
RafaelHGOliveira:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fc5024d
Add batch swap compatibility helper and result type
RafaelHGOliveira 6e62c2c
Add batch DLL picker and swap summary controls
RafaelHGOliveira e2d12bd
Add multi-selection mode and batch swap execution to games page
RafaelHGOliveira d5c70c7
Add en-US strings for batch DLL swap
RafaelHGOliveira dc82263
Merge remote-tracking branch 'upstream/main'
RafaelHGOliveira fdc30bb
Merge remote-tracking branch 'upstream/main'
RafaelHGOliveira 13cd8b8
Clarify batch swap toolbar controls and enable filter during selection
RafaelHGOliveira babf344
Synchronize selection across search and filters with distinct range i…
RafaelHGOliveira e66022c
Add explicit restore option to batch DLL picker rows
RafaelHGOliveira 46f8592
Execute batch DLL restore actions
RafaelHGOliveira 1c52397
Treat DLLs without a backup as already original in batch restore
RafaelHGOliveira 5b755b2
Add pt-BR strings for bulk swap and tidy en-US
RafaelHGOliveira c627e08
Use default dispatcher priority for selection resync
RafaelHGOliveira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| using DLSS_Swapper.Helpers; | ||
|
|
||
| namespace DLSS_Swapper.Data; | ||
|
|
||
| public enum BatchSwapStatus | ||
| { | ||
| // Covers successfully applied changes: DLL swaps, DLL restores, and preset updates. | ||
| Swapped, | ||
| Skipped, | ||
| Error, | ||
| } | ||
|
|
||
| public class BatchSwapResult | ||
| { | ||
| public string GameTitle { get; init; } = string.Empty; | ||
| public BatchSwapStatus Status { get; init; } | ||
|
|
||
| // Localised, game-agnostic action label built on the UI thread before the | ||
| // worker starts (e.g. "DLSS → 3.7.0" or "Preset DLSS → D"). Never resolved | ||
| // inside the batch worker. | ||
| public string ActionLabel { get; init; } = string.Empty; | ||
|
|
||
| // Resource key explaining a skip. Resolved lazily so it is read on the UI | ||
| // thread at display time, not inside the batch worker. | ||
| public string ReasonKey { get; init; } = string.Empty; | ||
|
|
||
| // Raw (unlocalised) message from the game operation when Status is Error. | ||
| public string ErrorMessage { get; init; } = string.Empty; | ||
|
|
||
| public bool PromptToRelaunchAsAdmin { get; init; } | ||
|
|
||
| public string DisplayText => Status switch | ||
| { | ||
| BatchSwapStatus.Skipped => $"{GameTitle} — {ActionLabel} — {ResourceHelper.GetString(ReasonKey)}", | ||
| BatchSwapStatus.Error when string.IsNullOrEmpty(ErrorMessage) => $"{GameTitle} — {ActionLabel} — {ResourceHelper.GetString("GamesPage_Batch_Error_Generic")}", | ||
| BatchSwapStatus.Error => $"{GameTitle} — {ActionLabel} — {ResourceHelper.GetFormattedResourceTemplate("GamesPage_Batch_Error_PossiblyPartialTemplate", ErrorMessage)}", | ||
| _ => $"{GameTitle} — {ActionLabel}", | ||
| }; | ||
| } |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.