-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feature: Add setting to hide non downloaded DLSS versions in selector #224
base: main
Are you sure you want to change the base?
Feature: Add setting to hide non downloaded DLSS versions in selector #224
Conversation
Thanks for this PR, I'll take a look at it on the weekend. |
Seems like my tests weren't that excessive that I thought I covered all cases. Pushed a fix and now it seems to work. |
I will test this when I get to testing the other one again |
I just had to do a merge of all those new changes back in to this so this can be merged back in. The show/hide works great. The wording in settings may change in the future, but its good enough for now. I think The only other thing is I wonder what the use case should be for a game with DLSS versoin not in the downloaded list. I think this looks a little confusing (especially if the panel covers the game) But also what we have currently is an option saying to download the version that is already installed Because the layout of this menu is getting completly changed I think we could probably leave it for now as its already an existing problem and come back to it when I get that new menu in. Marking the current as "fake downloaded" won't work as when you select a different version the current is now different and you can't see the old version in the list. Maybe based on that other idea of improting DLSS from games into the library, when a user wants to change a DLSS version from one that does not exist it tells them this will be automatically imported or something. Maybe instead of
But then it still has the issue of if you go from 3.5.10 (not in library) to 3.6 to 3.7 that now 3.5.10 is gone. The button to reset also won't work as that would only go back to 3.6. Any thoughts on how that could work? (not required to accept this PR) |
I choose not downloaded because it implies that this version has not yet been downloaded by the user. Non-downloaded would be something do describe it as something different (from my POV).
Here we can solve this by probably copying this one to the DLSS Swapper download directory where the other files lie, then it's get's detected as well and is shown inside the list. Would also fix the follow-up comment
I probably just described this in other words, lol.
We could do 3 fields in the DB for this.
Edit: And wasn't there a control in WinUI 3 where you're able to create a button with multiple options to choose from which the user can click? This is how you could solve this. |
Yep, that makes sense. I was also thinking "local" but it also doesn't feel right.
Seems copying to local automatically (without even alerting users) may solve a bunch of problems. Unsure if it introduces new problems of users filling up their downloads list if they don't want all versions there. We could add a hide button in the library. Also only enable delete if the DLSS version is not an initial or current version (see below) for any game. There is a seperate issue for that here,
We would also need to handle new version of DLSS detected in game folder and update that as "initial". We could then just do 2, initial and current. On launch if initial is not set we set it to actual from disk. If current is not actual from disk we update initial to be current. Setting initial would also copy initial to be the backed up version on disk. Detecting of current changing would also be the point we alert for this comment. EDIT:
I was planning to use a combobox (it may be dropdownbutton). I'll see if I can find screenshot of that |
Now that's a good looking one. Good job! 🙂 |
Summary
This resolves #208.
Detailed changes
Added a new "Hide Not Downloaded DLSS Versions" toggle switch on the settings page which defaults to
false
.This new settings is respected in
DLSSPickerControl
and filters out the non-downloaded DLSS versions with aWhere
condition through Linq.Additionally I added a new dialog confronting the user when the setting is enabled but no DLSS version is locally downloaded through DLSS Swapper.
Additional changes
For the sake of modernity I also re-formatted each of the touched files by me, namely the following:
There I mainly replaced the conditional operators (==, !=) with pattern matching or simplified them. Also I removed all useless
using
statements at the top of the files to reduce length and make them more readable.One thing to note, on DLSSPickerControl.xaml.cs I switched the hotpath of
detectedVersion
. It now checks fornot null
instead the other way around and out-commented theelse
which is moved with theTODO:
comment a little lower so it's not completely disappearing.Notes
Everything was tested by myself for functionality.