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

[Bug]: Opening games using the collapse protocol doesn't update Discord RPC #402

Closed
MiekoHikari opened this issue Feb 13, 2024 · 8 comments · Fixed by #403
Closed

[Bug]: Opening games using the collapse protocol doesn't update Discord RPC #402

MiekoHikari opened this issue Feb 13, 2024 · 8 comments · Fixed by #403
Assignees
Labels
Area: Launcher Issue labeled for Launcher update mechanism Area: Runtime Issue labeled for runtime, Hi3Helper.Core and other libraries used by Collapse Bug Something isn't working

Comments

@MiekoHikari
Copy link

MiekoHikari commented Feb 13, 2024

Affected Version

1.73.3 Preview

Bug Behavior

Launched the game with:

Collapse://open -g 2 -r Global

But Discord RPC was stuck at Honkai Impact 3rd (what I was last playing using collapse)

Expected Behavior

Collapse Discord RPC show Honkai: Star Rail status

Steps to reproduce

  1. Launch Collapse and set game to any game
  2. Close Collapse (or keep it open, it doesn't matter)
  3. Launch Collapse to open any other game (using Collapse://protocol)
  4. Check Discord, presence stuck at game you opened at step 1

Related Issues

No response

Screenshot(s)

Recording of reproducing the steps:
https://github.com/CollapseLauncher/Collapse/assets/77004524/44654b40-493b-4245-a538-78834b7f08c9

Additional Information

DxDiag: DxDiag.txt
Latest Logs: log-2024-02-13-pre1.73.3-id1.log

@MiekoHikari MiekoHikari added the Needs Triaging This issue needs the developer's attention to sort & prioritize. label Feb 13, 2024
@shatyuka
Copy link
Contributor

The Discord RPC feature is currently under refactoring, I'll take a look at it later.
CC @gablm

@bagusnl bagusnl added Bug Something isn't working Area: Runtime Issue labeled for runtime, Hi3Helper.Core and other libraries used by Collapse Area: Launcher Issue labeled for Launcher update mechanism and removed Needs Triaging This issue needs the developer's attention to sort & prioritize. labels Feb 13, 2024
Cryotechnic pushed a commit that referenced this issue Feb 16, 2024
* Fix Discord Rich Presence not being updated in certain cases

fix #402

* Qodana
neon-nyan pushed a commit that referenced this issue Feb 17, 2024
* Fix Discord Rich Presence not being updated in certain cases

fix #402

* Qodana
neon-nyan added a commit that referenced this issue Feb 23, 2024
* Initial commit

* Update ``Hi3Helper.Http`` and usages

* Update SevenZipExtractor Submodule

* Reduce progress refresh interval to 33ms

* Switch to ``GetResizedBitmapNew`` for OOBE BG Image

* Adjustment for Honkai: Star Rail Delta Patch support

* Fix Preload box displaying wrong message

* [skip ci] Update README.md

* Bump version

* Localize Delta-Patch Pre-Req. Dialog

* Update Submodules

* Fix build error due to Hi3Helper.Http changes

* [skip ci] Sync translation Translate en_US.json in id_ID

100% reviewed source file: 'en_US.json'
on 'id_ID'.

* Update submodule

EncTool

* Update submodule

Fixed SR IFix "empty" issue

* Support GI `Dynamic Character Resolution`

* [Steam shortcuts] Small fixes  (#386)

- Fixes folders not being found if the steamID ended with an 0.
- Adds/improves some logging when searching for valid userdata folders
- Changes target exe/folder to the stub executable/folder

* Fix broken steamID check and better folder logging

* Change Steam executable path to stub

* Fix formatting issue and playtime not updating when using protocols

* Copy Game Icon to Steam grid folder

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* (HSR GSP) Adjust Model registry

* Enable Steam overlay + Note about usage (#391)

* Fix broken steamID check and better folder logging

* Change Steam executable path to stub

* Fix formatting issue and playtime not updating when using protocols

* Copy Game Icon to Steam grid folder

* Enable AllowOverlay

* Note about overlay use.

* Change default values for AllowOverlay and AllowDesktopConfig

* Move logger in TryDownloadToCompletenessAsync up

* [skip ci] Fix code formatting

RegionManagement.TryDownloadToCompletenessAsync

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Fix ``StartDeltaPatchPreReqDownload`` sequence

* Fix cancellation issue on single session download not working

* Reduce refresh interval to 33ms

* [HSR] Attempt on fixing unused file not getting deleted

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Recalculate non-client area size after changing window size

* (Discord RPC) Catch SEHException on Dispose

* Merge branch 'main' of https://github.com/CollapseLauncher/Collapse

* Installation Management and HSR Repair Improvements

Hi3Helper.Http
    - Avoid globally disposed cancellation token
    - Fix single session download doesn't receive cancellation

Collapse Launcher (Installation Management)
    - Fix intermitten cancellation issue due to Hi3Helper.Http threading and disposal issues
    - Removes unnecessary override of Flush() code on HonkaiInstall class
    - Revert back the refresh interval to 100ms

Collapse Launcher (Honkai: Star Rail - Repair)
    - Fix duplicate pkg_version entries causing the file assumed as an unused file
    - Fix the streaming file still being used if the newest one from persistent folder exists
    - Make the FileStream assignment for FileType: Blocks, Audio and Video to use FileShare.Read
    - Ignore file size check while using Fast Check mode on Repair
    - [NEW] Adding support for reading multiple installed voice languages on repair

[NEW] Collapse Launcher (Honkai: Star Rail - Installation Management & Delta Patch support)
    - Adding support for updating additional audio packages if more than one voice languages are installed
    - Delta-patch mechanism is now aware to download the required files before doing integrity check and patching process
        - You might be noticed if you need to download additional files, including delta update for voice language pack
    - Reduce overhead on assigning FilePropertiesRemote class by caching the CRC (Hash) properties

Note: This commit is worth almost 21 hours of debugging and code writing :terismash:

* Fix missing NuGet

* Fix static ``Enable/DisableNonClientArea()``

* Fix carousel doesn't show if the MenuPanels.articlePanel is null

* Force GC after loading and cropping the background image

* Relocate image files

* Changes on News Carousel

- Remove unused margin binding
- Use static margin on "No news" element
- Fix derpy typo on checking null

* First iteration of OOBE Navigation

- It's now only the transitional animation for icon and title text 🗿

* Add IAssetProperty to list Cache and Repair entries

* Replace old CommunityToolkit with the new ones

Now the Markdown and DataGrid component is being provided by the new CommunityToolkit (8.0.x), replacing the unmaintained one (7.1.3)

* Use compiled RegEx on ``AppActivation`` argument splitting

* Adding more local changes

- Renaming DataTable namespace to CommunityToolkit.WinUI.Controls.Labs.*
- Move GetResizedBitmapNew, Stream2BitmapImage and Stream2Bitmap static method from MainPage to ImageLoaderHelper
- Adding Recommended CDN Selection based on lowest latency
- Adding new Loading Message ribbon design
- Adding AnimationHelper extensions to enable explicit and implicit animation triggers
- Adding Intro sequence on OOBE
- Fixed ContentDialogCollapse theme inconsistencies while switching from Light to Dark Theme or Vice Versa in realtime
- Fixed Glyph Icon on ContentDialogCollapse doesn't show while using Warning, Error and Success theme
- Adding new AppImagesFolder in LauncherConfig

* Update NuGet

* Adjust Theme Color

* Fix ``NullReferenceException`` issue on retrying other CDN

* Use the new ``LoadingMessageHelper`` widely

* Remove unused folder

* Make Loading Msg separator invisible if title or subtitle is empty

* Reorder ContentDialog and TrayIcon XAML

* Remove unused ``RotationTransition`` on ``LoadingStatusGrid``

* Use hide offset for ``LoadingStatusGrid`` initially

* Update NuGet

* Fix Titlebar's Close button not able to get focused

+ Also fixing where the old titlebar area from MainPage would still takeover after it leaves

* Fix the LoadingFrame not being able to get hidden early

* Reenable StartUpMenu's MainUI transition

* Fix ``GetElementCornerRadius`` not returning 8px Radius on Normal type

* Startup Game Description style adjustment

* Fix Loading Action style and not showing bug

* Return ``IsInitializationError=true`` on ``TryGetURLStatus`` to avoid crash

* Adding cancellation action on ``Recommended CDN Check`` routine

* Make ``ApplyAgreementButton`` rounded

* Explicitly hide L:oading action button if ``HideLoadingFrame`` is called

* Fix crash on applying light theme on startup

* Adding + Updating necessary submodules to update with upstream

* [skip ci] (chore) Update versions

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* Fix parsing for ```LastPlayTime``` in the Steam Shortcuts Parser  (#401)

* [SteamShortcutsParser] Fixes parsing of ```LastPlayTime```

should fix #400

https://gist.github.com/gablm/2a79355026bde51ac4f516d347fa1cd0 has a basic explanation of the shortcuts.vdf format. Hope it finds its way to anyone trying to decipher this file in the near future.

* Force parsing of 4 bytes for ```LastPlayTime``` and ```Appid```

there is a possibility of being a fix #400

* Fix redundancy

Makes Qodana happy

* [Feature] Pre-Launch and Post-Exit Commands Launching (#398)

* Update CsWinRT

This PR adds ability to run command before and after the game exits, values are saved to `CollapseSettings_Misc` registry on each region keys.

Command outputs recorded in the console, and it WILL NOT be interactable from the console. Also supports running GUI applications.

2.0.6 -> 2.0.7
https://github.com/microsoft/CsWinRT/releases/tag/2.0.7.240207.1

* (GSP) Move all GSPs into its own folder

Getting crowded up there on Pages main dir

* (GLC) Introduce GameLaunchCommand Backend

* Defer StarRail unnecesarry settings load on region load

* Avoid unnecessary UniversalGameSettings call on GameRunningWatcher

* (GLC) Introduce prototype in HSR GSP

* (GLC) Fix title

* (GLC) Backend Changes

- Rename PostLaunch to PostExit to better reflect the function
- Skip GLC if provided string is empty
- Change GLC console tag color to light red
- Adjust ErrorSender message
- Make consoleWidth and barwidth
available for private use
- Move `GAME STOPPED` bar into GameRunningWatcher
- Remove unused Window Restore inside ReadOutputLog (already available in GameRunningWatcher

* (GLC) Localization!

* (GLC) Frontends!

This also fixes warnings about OneWay bindings (WMC1506) for Genshin and StarRail GSPs by implementing INotifyPropertyChanged in the Ext

* (GLC) Fix main toggle margin and style

* (GSP) Fix HSR Character Quality selector

The enum is weird...

* (GSP) HSR: Disable VSync when selecting 120FPS

* Fix typos and CodeQA

* (GLC) Sanitize command for escape

Co-authored-by: Shatyuka <958182453@qq.com>

* Remove CsWinRT as its not needed anymore

Code generated is already on CoCreateInstance.cs

i forgor

* (GSP) HSR: Fix CharQual enum values

- Also renamed the enum name to avoid confusion
- Also clamped the values to avoid IndexOutOfRangeException

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] (GSP) HSR: Adjust CharQ summary

* (GLC) Honkai: Fix panel not collapsing when disabled

---------

Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Increase playtime accuracy  (#395)

* Use DateTime to calculate playtime

- Makes variable names more consistent
- Alters the way of how playtime is calculated

* Handle negative difference between dates

- New dialog about this problem
- Localization support for the dialog
- Localization support for the playtime display

* Avoid multiplying the same values twice

* Remove unnecessary loop to update the display

* Code Review changes

- Wrap Timer into a using statement.
- Reuse process found by GameBoost module

* Revert some changes and addition of @neon-nyan simplified process finder code

* (Discord RPC) Migrate to discord-rpc-csharp (#404)

* (Discord RPC) Migrate to discord-rpc-csharp

* (Discord RPC) Fix multi-thread issue caused by `CheckRunningGameInstance`

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>
Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>

* [URL Protocol] Fix Discord Rich Presence not updating. (#403)

* Fix Discord Rich Presence not being updated in certain cases

fix #402

* Qodana

* (DiscordRPC) Do not trim assembly

for now

* Disable AUMID

* Update NuGets + Submodules

JSON 8.0.1 -> 8.0.2

GitInfo 3.3.3 ->3.3.4
https://github.com/devlooped/GitInfo/releases/tag/v3.3.4

* FIx DiscordRPC ``SetActivity`` second request check issue

This caused a really rapid request from HomePage's CheckRunningGameInstance since it's requesting the same activity. Causing the RPC request flooded and makes DiscordRPC unresponsive.

* Update NuGet and ``CoCreateInstance``

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* Update NuGet

* Fix missing namespace

* Bump version and remove unused ``TrimmableAssembly`` attribute

* Update Submodules

* Add (EN) remark to agreement menu's policy title

* Revert "FIx DiscordRPC ``SetActivity`` second request check issue"

This reverts commit dbe2324.

* Update submodules

* Set ``AddElementToStackPanel`` to use ``Panel`` instead of ``StackPanel``

* Localize OOBE strings

* Update submodules

* (DiscordRPC) Allow trimming

* Protect some types/namespaces from ILTrim

* Code quality and fix build

* Qodana code quality fix (attempt: 1)

* Qodana code quality fix (attempt: 2)

* Remove unused ``T1`` Generics on ``ProgressBase`` and Qodana fixes

this is the third attempt :yaebruh:

* Fix build issue :PaimonAngry_Milkman:

* Remove nullable assignment ``??``

* Ignore ``MS-NET-LIBRARY-2019-06`` license check in Qodana

* Bring back ``CheckDependencyLicenses``

* Revert Qodana config changes

* Adding latency check refresh button + Shrink Language flyout height

* Move OOBE from prototype folder

* [skip ci] Qodana and Docs
- Fix outdated action on Qodana CI
- Ignore some licenses on license checker
- Add commit info for CommunityToolkit.Labs

* CI trigger

* (Qodana) Revert using solution

* Fix OOBE page nc area

* Fix right-aligned ComboBox popup position

* Fix build error

* Fix text doesn't get wrapped by using Grid on entire container

* Adjust vertical ``FlipView`` style and ``NewAccentButtonStyle``

* Revert ``IsDeferredScrollingEnabled`` on ``FlipView``

* Change ``LoadingMessageHelper.SetMessage`` behavior

Also adding the docs.

* (CodeQA) Wrap long codes

Also suppress some NRE warnings

* Adjust UI based on reviews

* Set the Logo Text container size if the small size is applied

* Fix animation getting stopped while it's not yet completed

* Fix build error

* Fix some non-empty news category has mascot appeared

* [skip ci] Add Rider project icon

* [skip ci] Add Jetbrains Toolbox project icon

* Wait for CDN loading to complete before ending intro sequence

---------

Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>
Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com>
Co-authored-by: Bagus Nur Listiyono <28079733+bagusnl@users.noreply.github.com>
Cryotechnic added a commit that referenced this issue Mar 1, 2024
* [skip ci] (chore) Update versions

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* Fix parsing for ```LastPlayTime``` in the Steam Shortcuts Parser  (#401)

* [SteamShortcutsParser] Fixes parsing of ```LastPlayTime```

should fix #400

https://gist.github.com/gablm/2a79355026bde51ac4f516d347fa1cd0 has a basic explanation of the shortcuts.vdf format. Hope it finds its way to anyone trying to decipher this file in the near future.

* Force parsing of 4 bytes for ```LastPlayTime``` and ```Appid```

there is a possibility of being a fix #400

* Fix redundancy

Makes Qodana happy

* [Feature] Pre-Launch and Post-Exit Commands Launching (#398)

* Update CsWinRT

This PR adds ability to run command before and after the game exits, values are saved to `CollapseSettings_Misc` registry on each region keys.

Command outputs recorded in the console, and it WILL NOT be interactable from the console. Also supports running GUI applications.

2.0.6 -> 2.0.7
https://github.com/microsoft/CsWinRT/releases/tag/2.0.7.240207.1

* (GSP) Move all GSPs into its own folder

Getting crowded up there on Pages main dir

* (GLC) Introduce GameLaunchCommand Backend

* Defer StarRail unnecesarry settings load on region load

* Avoid unnecessary UniversalGameSettings call on GameRunningWatcher

* (GLC) Introduce prototype in HSR GSP

* (GLC) Fix title

* (GLC) Backend Changes

- Rename PostLaunch to PostExit to better reflect the function
- Skip GLC if provided string is empty
- Change GLC console tag color to light red
- Adjust ErrorSender message
- Make consoleWidth and barwidth
available for private use
- Move `GAME STOPPED` bar into GameRunningWatcher
- Remove unused Window Restore inside ReadOutputLog (already available in GameRunningWatcher

* (GLC) Localization!

* (GLC) Frontends!

This also fixes warnings about OneWay bindings (WMC1506) for Genshin and StarRail GSPs by implementing INotifyPropertyChanged in the Ext

* (GLC) Fix main toggle margin and style

* (GSP) Fix HSR Character Quality selector

The enum is weird...

* (GSP) HSR: Disable VSync when selecting 120FPS

* Fix typos and CodeQA

* (GLC) Sanitize command for escape

Co-authored-by: Shatyuka <958182453@qq.com>

* Remove CsWinRT as its not needed anymore

Code generated is already on CoCreateInstance.cs

i forgor

* (GSP) HSR: Fix CharQual enum values

- Also renamed the enum name to avoid confusion
- Also clamped the values to avoid IndexOutOfRangeException

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] (GSP) HSR: Adjust CharQ summary

* (GLC) Honkai: Fix panel not collapsing when disabled

---------

Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in fr_FR

100% reviewed source file: 'en_US.json'
on 'fr_FR'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Increase playtime accuracy  (#395)

* Use DateTime to calculate playtime

- Makes variable names more consistent
- Alters the way of how playtime is calculated

* Handle negative difference between dates

- New dialog about this problem
- Localization support for the dialog
- Localization support for the playtime display

* Avoid multiplying the same values twice

* Remove unnecessary loop to update the display

* Code Review changes

- Wrap Timer into a using statement.
- Reuse process found by GameBoost module

* Revert some changes and addition of @neon-nyan simplified process finder code

* (Discord RPC) Migrate to discord-rpc-csharp (#404)

* (Discord RPC) Migrate to discord-rpc-csharp

* (Discord RPC) Fix multi-thread issue caused by `CheckRunningGameInstance`

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>
Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>

* [URL Protocol] Fix Discord Rich Presence not updating. (#403)

* Fix Discord Rich Presence not being updated in certain cases

fix #402

* Qodana

* (DiscordRPC) Do not trim assembly

for now

* Disable AUMID

* Update NuGets + Submodules

JSON 8.0.1 -> 8.0.2

GitInfo 3.3.3 ->3.3.4
https://github.com/devlooped/GitInfo/releases/tag/v3.3.4

* FIx DiscordRPC ``SetActivity`` second request check issue

This caused a really rapid request from HomePage's CheckRunningGameInstance since it's requesting the same activity. Causing the RPC request flooded and makes DiscordRPC unresponsive.

* Update NuGet and ``CoCreateInstance``

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Revert "FIx DiscordRPC ``SetActivity`` second request check issue"

This reverts commit dbe2324.

* Update submodules

* (DiscordRPC) Allow trimming

* Protect some types/namespaces from ILTrim

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* (CDN) Add GitLab mirror

* [skip ci] Qodana and Docs
- Fix outdated action on Qodana CI
- Ignore some licenses on license checker
- Add commit info for CommunityToolkit.Labs

* [skip ci] (Qodana) Revert using solution

* (CommunityTools) Add Enka.Network for HSR Glb

Requested by @kujou-kju via Discord

* [skip ci] (Qodana) Fix troublesome dependency check

Ignore dependency that doesn't have its license attached into it

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Force no trim on CLSCTX and HRESULT

Also fix formatting

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* (CodeQA) Remove unused StartPostInstallVerification

* (CodeQA) Fix FieldModifier warnings

* (CodeQA) App.xaml

- Suppress invalid warnings
- Remove redundant declarations
- nulls

* (CodeQA) CachesManagement

* (CodeQA) Core submodule

For future reference, some property in ConfigV2Store might give a warning about it being unused, either in the getter, setter, or the property itself. DO NOT REMOVE IT

* (CodeQA) Game Settings Pages

* (CodeQA) Classes pt. 1

Also updated Qodana config and add abbreviations list

* UI Changes and Runtime Improvements (Part 1) (#406)

* Initial commit

* Update ``Hi3Helper.Http`` and usages

* Update SevenZipExtractor Submodule

* Reduce progress refresh interval to 33ms

* Switch to ``GetResizedBitmapNew`` for OOBE BG Image

* Adjustment for Honkai: Star Rail Delta Patch support

* Fix Preload box displaying wrong message

* [skip ci] Update README.md

* Bump version

* Localize Delta-Patch Pre-Req. Dialog

* Update Submodules

* Fix build error due to Hi3Helper.Http changes

* [skip ci] Sync translation Translate en_US.json in id_ID

100% reviewed source file: 'en_US.json'
on 'id_ID'.

* Update submodule

EncTool

* Update submodule

Fixed SR IFix "empty" issue

* Support GI `Dynamic Character Resolution`

* [Steam shortcuts] Small fixes  (#386)

- Fixes folders not being found if the steamID ended with an 0.
- Adds/improves some logging when searching for valid userdata folders
- Changes target exe/folder to the stub executable/folder

* Fix broken steamID check and better folder logging

* Change Steam executable path to stub

* Fix formatting issue and playtime not updating when using protocols

* Copy Game Icon to Steam grid folder

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* (HSR GSP) Adjust Model registry

* Enable Steam overlay + Note about usage (#391)

* Fix broken steamID check and better folder logging

* Change Steam executable path to stub

* Fix formatting issue and playtime not updating when using protocols

* Copy Game Icon to Steam grid folder

* Enable AllowOverlay

* Note about overlay use.

* Change default values for AllowOverlay and AllowDesktopConfig

* Move logger in TryDownloadToCompletenessAsync up

* [skip ci] Fix code formatting

RegionManagement.TryDownloadToCompletenessAsync

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Fix ``StartDeltaPatchPreReqDownload`` sequence

* Fix cancellation issue on single session download not working

* Reduce refresh interval to 33ms

* [HSR] Attempt on fixing unused file not getting deleted

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Recalculate non-client area size after changing window size

* (Discord RPC) Catch SEHException on Dispose

* Merge branch 'main' of https://github.com/CollapseLauncher/Collapse

* Installation Management and HSR Repair Improvements

Hi3Helper.Http
    - Avoid globally disposed cancellation token
    - Fix single session download doesn't receive cancellation

Collapse Launcher (Installation Management)
    - Fix intermitten cancellation issue due to Hi3Helper.Http threading and disposal issues
    - Removes unnecessary override of Flush() code on HonkaiInstall class
    - Revert back the refresh interval to 100ms

Collapse Launcher (Honkai: Star Rail - Repair)
    - Fix duplicate pkg_version entries causing the file assumed as an unused file
    - Fix the streaming file still being used if the newest one from persistent folder exists
    - Make the FileStream assignment for FileType: Blocks, Audio and Video to use FileShare.Read
    - Ignore file size check while using Fast Check mode on Repair
    - [NEW] Adding support for reading multiple installed voice languages on repair

[NEW] Collapse Launcher (Honkai: Star Rail - Installation Management & Delta Patch support)
    - Adding support for updating additional audio packages if more than one voice languages are installed
    - Delta-patch mechanism is now aware to download the required files before doing integrity check and patching process
        - You might be noticed if you need to download additional files, including delta update for voice language pack
    - Reduce overhead on assigning FilePropertiesRemote class by caching the CRC (Hash) properties

Note: This commit is worth almost 21 hours of debugging and code writing :terismash:

* Fix missing NuGet

* Fix static ``Enable/DisableNonClientArea()``

* Fix carousel doesn't show if the MenuPanels.articlePanel is null

* Force GC after loading and cropping the background image

* Relocate image files

* Changes on News Carousel

- Remove unused margin binding
- Use static margin on "No news" element
- Fix derpy typo on checking null

* First iteration of OOBE Navigation

- It's now only the transitional animation for icon and title text 🗿

* Add IAssetProperty to list Cache and Repair entries

* Replace old CommunityToolkit with the new ones

Now the Markdown and DataGrid component is being provided by the new CommunityToolkit (8.0.x), replacing the unmaintained one (7.1.3)

* Use compiled RegEx on ``AppActivation`` argument splitting

* Adding more local changes

- Renaming DataTable namespace to CommunityToolkit.WinUI.Controls.Labs.*
- Move GetResizedBitmapNew, Stream2BitmapImage and Stream2Bitmap static method from MainPage to ImageLoaderHelper
- Adding Recommended CDN Selection based on lowest latency
- Adding new Loading Message ribbon design
- Adding AnimationHelper extensions to enable explicit and implicit animation triggers
- Adding Intro sequence on OOBE
- Fixed ContentDialogCollapse theme inconsistencies while switching from Light to Dark Theme or Vice Versa in realtime
- Fixed Glyph Icon on ContentDialogCollapse doesn't show while using Warning, Error and Success theme
- Adding new AppImagesFolder in LauncherConfig

* Update NuGet

* Adjust Theme Color

* Fix ``NullReferenceException`` issue on retrying other CDN

* Use the new ``LoadingMessageHelper`` widely

* Remove unused folder

* Make Loading Msg separator invisible if title or subtitle is empty

* Reorder ContentDialog and TrayIcon XAML

* Remove unused ``RotationTransition`` on ``LoadingStatusGrid``

* Use hide offset for ``LoadingStatusGrid`` initially

* Update NuGet

* Fix Titlebar's Close button not able to get focused

+ Also fixing where the old titlebar area from MainPage would still takeover after it leaves

* Fix the LoadingFrame not being able to get hidden early

* Reenable StartUpMenu's MainUI transition

* Fix ``GetElementCornerRadius`` not returning 8px Radius on Normal type

* Startup Game Description style adjustment

* Fix Loading Action style and not showing bug

* Return ``IsInitializationError=true`` on ``TryGetURLStatus`` to avoid crash

* Adding cancellation action on ``Recommended CDN Check`` routine

* Make ``ApplyAgreementButton`` rounded

* Explicitly hide L:oading action button if ``HideLoadingFrame`` is called

* Fix crash on applying light theme on startup

* Adding + Updating necessary submodules to update with upstream

* [skip ci] (chore) Update versions

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* Fix parsing for ```LastPlayTime``` in the Steam Shortcuts Parser  (#401)

* [SteamShortcutsParser] Fixes parsing of ```LastPlayTime```

should fix #400

https://gist.github.com/gablm/2a79355026bde51ac4f516d347fa1cd0 has a basic explanation of the shortcuts.vdf format. Hope it finds its way to anyone trying to decipher this file in the near future.

* Force parsing of 4 bytes for ```LastPlayTime``` and ```Appid```

there is a possibility of being a fix #400

* Fix redundancy

Makes Qodana happy

* [Feature] Pre-Launch and Post-Exit Commands Launching (#398)

* Update CsWinRT

This PR adds ability to run command before and after the game exits, values are saved to `CollapseSettings_Misc` registry on each region keys.

Command outputs recorded in the console, and it WILL NOT be interactable from the console. Also supports running GUI applications.

2.0.6 -> 2.0.7
https://github.com/microsoft/CsWinRT/releases/tag/2.0.7.240207.1

* (GSP) Move all GSPs into its own folder

Getting crowded up there on Pages main dir

* (GLC) Introduce GameLaunchCommand Backend

* Defer StarRail unnecesarry settings load on region load

* Avoid unnecessary UniversalGameSettings call on GameRunningWatcher

* (GLC) Introduce prototype in HSR GSP

* (GLC) Fix title

* (GLC) Backend Changes

- Rename PostLaunch to PostExit to better reflect the function
- Skip GLC if provided string is empty
- Change GLC console tag color to light red
- Adjust ErrorSender message
- Make consoleWidth and barwidth
available for private use
- Move `GAME STOPPED` bar into GameRunningWatcher
- Remove unused Window Restore inside ReadOutputLog (already available in GameRunningWatcher

* (GLC) Localization!

* (GLC) Frontends!

This also fixes warnings about OneWay bindings (WMC1506) for Genshin and StarRail GSPs by implementing INotifyPropertyChanged in the Ext

* (GLC) Fix main toggle margin and style

* (GSP) Fix HSR Character Quality selector

The enum is weird...

* (GSP) HSR: Disable VSync when selecting 120FPS

* Fix typos and CodeQA

* (GLC) Sanitize command for escape

Co-authored-by: Shatyuka <958182453@qq.com>

* Remove CsWinRT as its not needed anymore

Code generated is already on CoCreateInstance.cs

i forgor

* (GSP) HSR: Fix CharQual enum values

- Also renamed the enum name to avoid confusion
- Also clamped the values to avoid IndexOutOfRangeException

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] (GSP) HSR: Adjust CharQ summary

* (GLC) Honkai: Fix panel not collapsing when disabled

---------

Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Increase playtime accuracy  (#395)

* Use DateTime to calculate playtime

- Makes variable names more consistent
- Alters the way of how playtime is calculated

* Handle negative difference between dates

- New dialog about this problem
- Localization support for the dialog
- Localization support for the playtime display

* Avoid multiplying the same values twice

* Remove unnecessary loop to update the display

* Code Review changes

- Wrap Timer into a using statement.
- Reuse process found by GameBoost module

* Revert some changes and addition of @neon-nyan simplified process finder code

* (Discord RPC) Migrate to discord-rpc-csharp (#404)

* (Discord RPC) Migrate to discord-rpc-csharp

* (Discord RPC) Fix multi-thread issue caused by `CheckRunningGameInstance`

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>
Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>

* [URL Protocol] Fix Discord Rich Presence not updating. (#403)

* Fix Discord Rich Presence not being updated in certain cases

fix #402

* Qodana

* (DiscordRPC) Do not trim assembly

for now

* Disable AUMID

* Update NuGets + Submodules

JSON 8.0.1 -> 8.0.2

GitInfo 3.3.3 ->3.3.4
https://github.com/devlooped/GitInfo/releases/tag/v3.3.4

* FIx DiscordRPC ``SetActivity`` second request check issue

This caused a really rapid request from HomePage's CheckRunningGameInstance since it's requesting the same activity. Causing the RPC request flooded and makes DiscordRPC unresponsive.

* Update NuGet and ``CoCreateInstance``

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* Update NuGet

* Fix missing namespace

* Bump version and remove unused ``TrimmableAssembly`` attribute

* Update Submodules

* Add (EN) remark to agreement menu's policy title

* Revert "FIx DiscordRPC ``SetActivity`` second request check issue"

This reverts commit dbe2324.

* Update submodules

* Set ``AddElementToStackPanel`` to use ``Panel`` instead of ``StackPanel``

* Localize OOBE strings

* Update submodules

* (DiscordRPC) Allow trimming

* Protect some types/namespaces from ILTrim

* Code quality and fix build

* Qodana code quality fix (attempt: 1)

* Qodana code quality fix (attempt: 2)

* Remove unused ``T1`` Generics on ``ProgressBase`` and Qodana fixes

this is the third attempt :yaebruh:

* Fix build issue :PaimonAngry_Milkman:

* Remove nullable assignment ``??``

* Ignore ``MS-NET-LIBRARY-2019-06`` license check in Qodana

* Bring back ``CheckDependencyLicenses``

* Revert Qodana config changes

* Adding latency check refresh button + Shrink Language flyout height

* Move OOBE from prototype folder

* [skip ci] Qodana and Docs
- Fix outdated action on Qodana CI
- Ignore some licenses on license checker
- Add commit info for CommunityToolkit.Labs

* CI trigger

* (Qodana) Revert using solution

* Fix OOBE page nc area

* Fix right-aligned ComboBox popup position

* Fix build error

* Fix text doesn't get wrapped by using Grid on entire container

* Adjust vertical ``FlipView`` style and ``NewAccentButtonStyle``

* Revert ``IsDeferredScrollingEnabled`` on ``FlipView``

* Change ``LoadingMessageHelper.SetMessage`` behavior

Also adding the docs.

* (CodeQA) Wrap long codes

Also suppress some NRE warnings

* Adjust UI based on reviews

* Set the Logo Text container size if the small size is applied

* Fix animation getting stopped while it's not yet completed

* Fix build error

* Fix some non-empty news category has mascot appeared

* [skip ci] Add Rider project icon

* [skip ci] Add Jetbrains Toolbox project icon

* Wait for CDN loading to complete before ending intro sequence

---------

Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>
Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com>
Co-authored-by: Bagus Nur Listiyono <28079733+bagusnl@users.noreply.github.com>

* Localize image cropper window

* (CodeQA) Classes pt. 2

* (CodeQA) Classes pt. 3

pls check ;-;

* (CodeQA) Xaml Styler

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* Add ``TryGetAbsoluteToRelativeCDNURL`` to translate absolute CDN URL paths

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Adding fix for Senadina Delta-patch

+ Update Submodule

* [skip ci] Sync translation Translate en_US.json in de_DE [Manual Sync]

75% of minimum 70% reviewed source file: 'en_US.json'
on 'de_DE'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in zh_TW [Manual Sync]

77% of minimum 70% reviewed source file: 'en_US.json'
on 'zh_TW'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in ko_KR [Manual Sync]

78% of minimum 70% reviewed source file: 'en_US.json'
on 'ko_KR'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in ru_RU [Manual Sync]

95% of minimum 70% reviewed source file: 'en_US.json'
on 'ru_RU'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in pt_PT [Manual Sync]

92% of minimum 70% reviewed source file: 'en_US.json'
on 'pt_PT'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in id_ID [Manual Sync]

94% of minimum 70% reviewed source file: 'en_US.json'
on 'id_ID'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in vi_VN [Manual Sync]

84% of minimum 70% reviewed source file: 'en_US.json'
on 'vi_VN'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in th_TH [Manual Sync]

82% of minimum 70% reviewed source file: 'en_US.json'
on 'th_TH'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Sync translation Translate en_US.json in uk_UA [Manual Sync]

100% reviewed source file: 'en_US.json'
on 'uk_UA'.

* [skip ci] Sync translation Translate en_US.json in fr_FR [Manual Sync]

95% of minimum 70% reviewed source file: 'en_US.json'
on 'fr_FR'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip ci] Update SECURITY.md

* Senadina Repair/Delta/Cache Compatibility Fix by @neon-nyan (#408)

* Add ``CastAs<T>()`` extension to ``IGameVersionCheck``

* Adding initial adjustment

* Implement Identifier getter

* Add temporary fix for Delta-patch

* Adjust changes based on Senadina changes

+ We are now using our backend service to provide information needed for repair process.

* Remove test codes

* Fix unexpected size and wrong file selected on CG

* ISTG, SHAAAPPHHH

+ Fix corresponding path for the language based CG

* Use new OOBE UI widely and fix some issue

* Ignore ``FBData`` on cache check

* (Qodana) Ignore "ThisAssembly.Constants" license check

Why does it suddenly lost its license file? i dunno

* (CodeQA) Fix problems in ProgressBase and HonkaiRepair::Fetch

---------

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
@BobbyWibowo
Copy link

@gablm Hi there, is this confirmed to also be fixed when launching via command line parameters? (e.g., Add to Steam shortcuts)

If I understood correctly, fix for this one should've been shipped alongside 1.73.4 Preview.

Steps to reproduce is the same as the original post, except step 3 being launching the games via Steam's shortcuts instead.


Or is it related with this particular line in the change log?

For Custom Discord Client users, the current arRPC client that is used to get the RPC information for clients such as Vesktop, ArmCord, etc. has a bug pertaining to the update rate of the status, which can in turn cause the Discord status to appear "stuck" and not update. Please wait for the fix to be merged to the main repository. For custom client developers, please refer to OpenAsar/arrpc#71

Since I do happen to be using Vesktop.

@bagusnl
Copy link
Member

bagusnl commented Mar 2, 2024

Please try with official discord client, if it still doesn't update then its gonna be on the command line issue

@BobbyWibowo
Copy link

BobbyWibowo commented Mar 2, 2024

@bagusnl Can confirm still happens with official client!

EDIT: Here's a short recording just in case, https://i.fiery.me/noYmUn25.mp4

@bagusnl bagusnl reopened this Mar 2, 2024
@bagusnl
Copy link
Member

bagusnl commented Mar 2, 2024

Cc @gablm could it be something i accidentally fucked up in the codeQA?

@gablm
Copy link
Member

gablm commented Mar 2, 2024

@gablm Hi there, is this confirmed to also be fixed when launching via command line parameters? (e.g., Add to Steam shortcuts)

Hi!
I actually forgot to fix it when redirection doesn't happen (AKA when Collapse is not opened already).

@BobbyWibowo can you try this build?
https://nightly.link/CollapseLauncher/Collapse/actions/runs/8122717076/collapse_x64-Release_net8.0-windows10.0.22621.0_448ff7788ddb497e24118883f0d91366672c18bc.zip

You can unzip it anywhere.
To test it you can either:

  • add some regions to Steam (you will need to add them again from the stable/preview version later if you pretend to use them with that version)
    or
  • use the terminal and the command CollapseLauncher.exe open --game (0-2) --region (0-6, dependent on the game)

@BobbyWibowo
Copy link

@gablm From a few quick tests with "Add to Steam" shortcuts, I can confirm that build appears to be working just fine, even with Vesktop 🎉

@gablm gablm closed this as completed in 448ff77 Mar 4, 2024
@gablm
Copy link
Member

gablm commented Mar 4, 2024

Thanks for testing and confirming the fix works!

bagusnl added a commit that referenced this issue Mar 9, 2024
* [skip ci] Update README.md

* Clamp column width if there is no space left

This to fix the DataTable component causing a crash due to negative value if small window mode is used.

* Enable Rich Presence only after the activated region is set

might fix #402

* Fix blurry console icon

Also, get the icon from exe rather than a separate ico file

* (CodeQA) Theme xaml

* Move RPC dispose

Adjusted to be in the same file where it is initialized (448ff77)

* Change default value displayed for ```Download Threads``` to match the real default value

* Auto resize DataTable column width using star

L.CRC and R.CRC are hidden in small window mode before this commit.

* [skip ci] Update LICENSE and its references

* [skip ci] Update SECURITY.md
- Added @shatyuka and @gablm to the active maintainers list
- Update supported version section

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* HI3 Senadina Game Settings Adjustments (#417)

* (GSP) HI3: Adjust to new version

* [skip ci] Add more abbreviation list

* Use ShouldComputeInputPris on build
To try mitigate resource not found error

* (GSP) More Hi3 Senadina backend changes

* (GSP) Force GraphicsGrade to 6 on Save

* (GSP) Docs

* (GSP) Senadina frontends

and localization

* (GSP) Disable preset

* CodeQA stuff

* Fix crash due to value not exist for ``GraphicsReflectionQuality``

* Move and change Physics toggle to ``ToggleSwitch``

* review adjustments

* Review adjustment
- Use comparedTo instead of TypeExtensions for Equals() in PhysicsSimulation.cs
- Adjustment on comparedTo in GraphicsGrade.cs
- Remove unnecessary int declaration in Honkai\RegistryClass\Enums.cs

---------

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
Co-authored-by: Ron Friedman <cryogen65@gmail.com>

* Add delay for GameBoost

Adding 10 seconds before changing the priority to allow for the process to initialize.
Also move to its own method to avoid error mixed up with main game launching method error(s).
Also also, fix some code QA problems on the changed section because might as well :ahuehue:

* Update WindowsAppSDK to 1.5.0

Related #418

* (DiscordRPC) Reset `_firstTimeConnect` for new client

* Use Waifu2X to enlarge background image (#412)

* Use Waifu2X to enlarge background image

* More checks

* Resize to window size

We will not get pixelated image using MagicScaler

* Code cleanup

* Rename models folder name

* Add some useful logs

* Auto detect GPU

discrete > integrated > others

* Enable OpenMP for speed

* [skip ci] Add WAIFU2X.LICENSE and OPENMP.LICENSE

* Minor fixes

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>

* [skip ci] Use ex variable on GameBoost_Invoke

oops...

* (CodeQA) SettingsPage

- Change copyright year
- Sync maintainers
- Suppress null scans (take it ReSharper!)
- Suppress unrelated Xaml warnings

* Stop "open -p" from starting a game when not updated

* (Waifu2X) Fix failed test log

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* (Waifu2X) Fix crash on exit

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Fix CustomBG checkbox logic

:derp:

* Fix Level of Detail setting order for Hi3

* Read the cache reference from stream for Hi3

* Keyboard Shortcut improvements (#416)

* Revamp how shortcuts are saved and fix UI margins

* Convert old shortcut list

* Minor refactor + Fix KbShortcut related flyout crash

* Allow localization of VirtualKeyModifiers

* Remove invalid shortcuts and save if the dictionary is altered

* Qodana

* Parse kbshortcuts .ini only when enabling the shortcuts

* Turn DefaultShortcutList into a readonly field

* (KbShortcuts) Get GameCount and MaxRegions from Metadata

* Remove Equals/HashCode and directly compare values

* Update KeyboardShortcuts.cs

* No possible multiple enumerations while loading shortcuts

* Fix validity check for new shortcut combinations

* (KeyboardShortcut) CodeQA

- Suppress null warnings
- Wrap long lines
- Remove unnecessary statement

* (KeyboardShortcut) CodeQA part 2

Bc no save :(

* (Keyboard Shortcut) Fix opacity animation

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* [skip ci] Bump version

* Add function to launch game in alt (legacy Collapse) launch mode

* Update NuGet(s)
- MagicScaler 0.14.0 -> 0.14.2
https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.1
https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.2

- BuildSDK

* Small refactor on HomePage.StartGame
- Avoid multiple call on the same parameter
- Avoid unnecessary call on unused parameter
- Use async overload when disposing ResizableWindowHookToken
- Avoid NRE if WatchOutputLog is unexpectedly cancelled before the time
- Suppress some NRE

---------

Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Ron Friedman <cryogen65@gmail.com>
bagusnl added a commit that referenced this issue Mar 9, 2024
* [skip ci] Update README.md

* Clamp column width if there is no space left

This to fix the DataTable component causing a crash due to negative value if small window mode is used.

* Enable Rich Presence only after the activated region is set

might fix #402

* Fix blurry console icon

Also, get the icon from exe rather than a separate ico file

* (CodeQA) Theme xaml

* Move RPC dispose

Adjusted to be in the same file where it is initialized (448ff77)

* Change default value displayed for ```Download Threads``` to match the real default value

* Auto resize DataTable column width using star

L.CRC and R.CRC are hidden in small window mode before this commit.

* [skip ci] Update LICENSE and its references

* [skip ci] Update SECURITY.md
- Added @shatyuka and @gablm to the active maintainers list
- Update supported version section

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* HI3 Senadina Game Settings Adjustments (#417)

* (GSP) HI3: Adjust to new version

* [skip ci] Add more abbreviation list

* Use ShouldComputeInputPris on build
To try mitigate resource not found error

* (GSP) More Hi3 Senadina backend changes

* (GSP) Force GraphicsGrade to 6 on Save

* (GSP) Docs

* (GSP) Senadina frontends

and localization

* (GSP) Disable preset

* CodeQA stuff

* Fix crash due to value not exist for ``GraphicsReflectionQuality``

* Move and change Physics toggle to ``ToggleSwitch``

* review adjustments

* Review adjustment
- Use comparedTo instead of TypeExtensions for Equals() in PhysicsSimulation.cs
- Adjustment on comparedTo in GraphicsGrade.cs
- Remove unnecessary int declaration in Honkai\RegistryClass\Enums.cs

---------

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
Co-authored-by: Ron Friedman <cryogen65@gmail.com>

* Add delay for GameBoost

Adding 10 seconds before changing the priority to allow for the process to initialize.
Also move to its own method to avoid error mixed up with main game launching method error(s).
Also also, fix some code QA problems on the changed section because might as well :ahuehue:

* Update WindowsAppSDK to 1.5.0

Related #418

* (DiscordRPC) Reset `_firstTimeConnect` for new client

* Use Waifu2X to enlarge background image (#412)

* Use Waifu2X to enlarge background image

* More checks

* Resize to window size

We will not get pixelated image using MagicScaler

* Code cleanup

* Rename models folder name

* Add some useful logs

* Auto detect GPU

discrete > integrated > others

* Enable OpenMP for speed

* [skip ci] Add WAIFU2X.LICENSE and OPENMP.LICENSE

* Minor fixes

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>

* [skip ci] Use ex variable on GameBoost_Invoke

oops...

* (CodeQA) SettingsPage

- Change copyright year
- Sync maintainers
- Suppress null scans (take it ReSharper!)
- Suppress unrelated Xaml warnings

* Stop "open -p" from starting a game when not updated

* (Waifu2X) Fix failed test log

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* (Waifu2X) Fix crash on exit

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* Fix CustomBG checkbox logic

:derp:

* Fix Level of Detail setting order for Hi3

* Read the cache reference from stream for Hi3

* Keyboard Shortcut improvements (#416)

* Revamp how shortcuts are saved and fix UI margins

* Convert old shortcut list

* Minor refactor + Fix KbShortcut related flyout crash

* Allow localization of VirtualKeyModifiers

* Remove invalid shortcuts and save if the dictionary is altered

* Qodana

* Parse kbshortcuts .ini only when enabling the shortcuts

* Turn DefaultShortcutList into a readonly field

* (KbShortcuts) Get GameCount and MaxRegions from Metadata

* Remove Equals/HashCode and directly compare values

* Update KeyboardShortcuts.cs

* No possible multiple enumerations while loading shortcuts

* Fix validity check for new shortcut combinations

* (KeyboardShortcut) CodeQA

- Suppress null warnings
- Wrap long lines
- Remove unnecessary statement

* (KeyboardShortcut) CodeQA part 2

Bc no save :(

* (Keyboard Shortcut) Fix opacity animation

---------

Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com>

* [skip ci] Sync translation Translate en_US.json in es_419

100% reviewed source file: 'en_US.json'
on 'es_419'.

* [skip ci] Sync translation Translate en_US.json in ja_JP

100% reviewed source file: 'en_US.json'
on 'ja_JP'.

* [skip ci] Sync translation Translate en_US.json in zh_CN

100% reviewed source file: 'en_US.json'
on 'zh_CN'.

* [skip ci] Bump version

* Add function to launch game in alt (legacy Collapse) launch mode

* Update NuGet(s)
- MagicScaler 0.14.0 -> 0.14.2
https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.1
https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.2

- BuildSDK

* Small refactor on HomePage.StartGame
- Avoid multiple call on the same parameter
- Avoid unnecessary call on unused parameter
- Use async overload when disposing ResizableWindowHookToken
- Avoid NRE if WatchOutputLog is unexpectedly cancelled before the time
- Suppress some NRE

---------

Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com>
Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com>
Co-authored-by: Shatyuka <958182453@qq.com>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Ron Friedman <cryogen65@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Launcher Issue labeled for Launcher update mechanism Area: Runtime Issue labeled for runtime, Hi3Helper.Core and other libraries used by Collapse Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants