-
-
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
[New Feature] Zenless Zone Zero Game Setings #532
Conversation
NOTE: - Reverse Encode needs checking - GeneralData is still F'd - I'm eepy
WARNING: WILL CRASH WHEN OPENING THE PAGE
- Initialize General Data settings later due to certain properties are not initialized sooner - Fix path for general data config file - Fix frontend format
me dum
As the file is based on the old and obsolete BinaryFormatter serializer and no longer available for future .NET runtime releases, emulating the read/write routine should do the trick. Thanks @shatyuka for the help on the initial implementation - Adding basic props for ZZZ ``GeneralData`` class - Remove unused Encoder method - Clean-up namespaces - Implement JsonNode De/Serializer API - Implement JsonNode's Getter and Setter This is the difficult one :pepeHands: - Remove testing setter Co-authored-by: Shatyuka <[email protected]> Co-authored-by: Bagus Nur Listiyono <[email protected]>
Thank you for forcing us to use JsonNode this time. Fucc you, HoYo! :frick:
Also suppress interface warning by implementing Load() and LoadWithMagic() but cast the method from base
also add render res enum
- Do manual conversion of int <=> bool - Add :FRICK: tons of the keys - New enum, preset
+ This is useful to avoid NRE error if the new GeneralData() or any MagicNodeBaseValues<T> members are faulty or null. So instead of letting it null, we will instead create a new default instance of it. + This also can be useful to create a new default values of GENERAL_DATA.bin or any MagicNodeBaseValues<T> type files if don't exist.
+ Fix the bug by flushing the writer before reusing it
WARNING: NOT YET TIED INTO GENERAL DATA
+ Fix double disposal when cleaning-up log folder + Fix crash upon cleaning-up log folder + Fix the log files don't contain launcher infos + Fix where the launcher have "vUnknown" prefixes + Fix logs do not append to the last line on launcher re-run + Fix Console window sometime spawned for a moment on start-up, even with "Show Console" not enabled
Also adding VSync option
forgor how mad qodana will be on in progress feature. will reopen when stuff is mostly done |
|
||
// Write into the file | ||
string jsonString = SettingsJsonNode.SerializeJsonNode(Context, false, false); | ||
Sleepy.WriteString(filePath!, jsonString, Magic); |
Check warning
Code scanning / QDNET
Redundant nullable warning suppression expression Warning
|
||
try | ||
{ | ||
string? filePath = versionManager.ConfigFilePath; |
Check warning
Code scanning / QDNET
Variable can be declared as non-nullable Warning
public void Save() | ||
{ | ||
// Get the file and dir path | ||
string? filePath = GameVersionManager.ConfigFilePath; |
Check warning
Code scanning / QDNET
Variable can be declared as non-nullable Warning
It causes EVERY popup to be disabled, not just sliders and yeah, it does it for the entire app LMAO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I Approb!
CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/ZenlessGameSettingsPage.xaml.cs
Outdated
Show resolved
Hide resolved
CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/ZenlessGameSettingsPage.xaml.cs
Outdated
Show resolved
Hide resolved
approball accepted, merging changes by merge commit Thanks all for this painful GSP implementation~ |
# What's New? - 1.80.16 > ### Note regarding Sophon / Genshin Preload saying `Download` after preload is completed > This has been fixed in this release, _but_ you have to do it once to make the identifier file that the preload is completed. There will be no significant download happened, it will just verify the downloaded chunks. > After that, the dialog should say its finished downloading and the button turns to `Verify Package Integrity`. > While verifying it will says "Downloading", this _might_ not be true as both download and verification happened in the same method. Check network activity in the task manager if you are curious. - **[New]** Zenless Zone Zero Game Settings Integration, by @bagusnl, @neon-nyan, @shatyuka - You can now change Graphics, Audio, and Language settings for your game before even running it! - This was a fun one, over 4k lines of code in the single PR (mostly) for this feature. - Almost half of them was just the necessary code for Collapse to be able to read and write the settings to the necessary places. Thanks @shatyuka and @neon-nyan for all of those mumbo jumbo that @bagusnl can't even comprehend with a cup of coffee, or three. - For more fun details, you can go and open this [pull request](#532) - **[Fix]** Various fixes for Sophon download method, by @neon-nyan - Adding an indicator if Sophon Mode is used - Fix Sophon preload completion is not detectable, now finished Sophon download should show `Verify` button instead of `Download` - Fix thread exhaustion caused by too many connections being made leading to premature download stop (stuck download) - Fix (hopefully) unknown thrown, causing the preload download to gets finished prematurely - **[Fix]** Bump NuGets and dotNET SDK to mitigate vulnerability, by @bagusnl - While Collapse is not affected by this, we always try to be up to date and bump all vulnerability that might get included with our package, dotNET included as we publish them with all the necessary runtime dlls (notice you never had to update dotNET runtime for Collapse?) - This mitigate vulnerability found in System.Text.Json built-in JSON parser for dotNET. Read more about it [here](https://github.com/CollapseLauncher/Collapse/security/dependabot/2) - **[Fix]** Clearing log files causing launcher to crash, by @neon-nyan - **[Fix]** Console might get displayed for a brief moment on launch when its disabled, by @neon-nyan - **[Fix]** Allow system to sleep after Sophon download is completed, by @bagusnl - **[Imp]** New slider style, by @neon-nyan - **[Imp]** Use same GUID for Tray Icon on launch, by @bagusnl - This is to prevent Tray Icon preference (visibility, order, etc.) to change when the app path changed like after an update
# What's New? - 1.80.16 > ### Note regarding Sophon / Genshin Preload saying `Download` after preload is completed > This has been fixed in this release, _but_ you have to do it once to make the identifier file that the preload is completed. There will be no significant download happened, it will just verify the downloaded chunks. > After that, the dialog should say its finished downloading and the button turns to `Verify Package Integrity`. > While verifying it will says "Downloading", this _might_ not be true as both download and verification happened in the same method. Check network activity in the task manager if you are curious. - **[New]** Zenless Zone Zero Game Settings Integration, by @bagusnl, @neon-nyan, @shatyuka - You can now change Graphics, Audio, and Language settings for your game before even running it! - This was a fun one, over 4k lines of code in the single PR (mostly) for this feature. - Almost half of them was just the necessary code for Collapse to be able to read and write the settings to the necessary places. Thanks @shatyuka and @neon-nyan for all of those mumbo jumbo that @bagusnl can't even comprehend with a cup of coffee, or three. - For more fun details, you can go and open this [pull request](#532) - **[Fix]** Various fixes for Sophon download method, by @neon-nyan - Adding an indicator if Sophon Mode is used - Fix Sophon preload completion is not detectable, now finished Sophon download should show `Verify` button instead of `Download` - Fix thread exhaustion caused by too many connections being made leading to premature download stop (stuck download) - Fix (hopefully) unknown thrown, causing the preload download to gets finished prematurely - **[Fix]** Bump NuGets and dotNET SDK to mitigate vulnerability, by @bagusnl - While Collapse is not affected by this, we always try to be up to date and bump all vulnerability that might get included with our package, dotNET included as we publish them with all the necessary runtime dlls (notice you never had to update dotNET runtime for Collapse?) - This mitigate vulnerability found in System.Text.Json built-in JSON parser for dotNET. Read more about it [here](https://github.com/CollapseLauncher/Collapse/security/dependabot/2) - **[Fix]** Clearing log files causing launcher to crash, by @neon-nyan - **[Fix]** Console might get displayed for a brief moment on launch when its disabled, by @neon-nyan - **[Fix]** Allow system to sleep after Sophon download is completed, by @bagusnl - **[Imp]** New slider style, by @neon-nyan - **[Imp]** Use same GUID for Tray Icon on launch, by @bagusnl - This is to prevent Tray Icon preference (visibility, order, etc.) to change when the app path changed like after an update ### Templates <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
you forgot to change the readme lol |
Main Goal
Implements Zenless Game Settings to Collapse
PR Status :