Skip to content
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

Load Genshin graphics settings from globalPerfData #302

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

shatyuka
Copy link
Contributor

@shatyuka shatyuka commented Oct 25, 2023

Fix inconsistency with in-game settings.

Loading mechanism:
First try to load globalPerfData, and the current graphics quality option is saved in saveItems entryType 18. Then patch the selected graphics quality preset using entries in saveItems.
If globalPerfData does not exist (older versions), try to import it from graphicsData. May not be needed, but it's done anyway.

graphicsData globalPerfData
currentVolatielGrade saveItems entryType 18
customVolatileGrades saveItems (-1 to zero-based)
volatileVersion portedVersion

GlobalPerfData will now be used as the data source for the UI.
Also change the relevant enums to zero-based.

globalPerfData, High graphics quality, Antialiasing changed to SMAA

{
    "saveItems":[
        {
            "entryType":18,
            "index":3,
            "itemVersion":"CNRELWin4.1.0"
        },
        {
            "entryType":8,
            "index":2,
            "itemVersion":"CNRELWin4.1.0"
        }
    ],
    "truePortedFromGraphicData":true,
    "portedVersion":"CNRELWin4.1.0",
    "portedFromGraphicData":false
}

Maintainer Edits:
Related to #295

@shatyuka shatyuka added Game: Genshin Impact Issue labeled for Genshin Impact Area: UI/UX Issue labeled for User Interface/eXperience related issue labels Oct 25, 2023
@bagusnl bagusnl requested a review from a team October 25, 2023 21:26
@bagusnl bagusnl added the Bug Something isn't working label Oct 25, 2023
Copy link
Member

@bagusnl bagusnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good on me for the scope of fixing this bug. Tested the artifact output and runs fine. Though needs extensive testing to make sure everything is alright.

Copy link
Member

@bagusnl bagusnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving last changes as discussed in Discord

Copy link
Member

@neon-nyan neon-nyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! As per latest changes, I would say that these changes can be merged.

@neon-nyan neon-nyan merged commit 45ebc2a into CollapseLauncher:main Oct 29, 2023
1 check passed
neon-nyan pushed a commit that referenced this pull request Oct 29, 2023
* Load Genshin graphics settings from ``globalPerfData``

* Throw an exception if registry key could not be found
@shatyuka shatyuka deleted the game-settings branch December 17, 2023 11:31
@neon-nyan neon-nyan added this to the v1.72.x milestone Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: UI/UX Issue labeled for User Interface/eXperience related issue Bug Something isn't working Game: Genshin Impact Issue labeled for Genshin Impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants