Repository navigation
Conversation
Expose `Progress` and `Status` on `IBackgroundActivity` and use them when wiring notification handlers in `BackgroundActivityManager`. This immediately initializes notification text/progress for already-running activities instead of waiting for the next event, preventing placeholder content from lingering.
Add a reusable speed-calculator reset helper in `ProgressBase` and use it in plugin install progress updates to avoid bogus speed deltas after state transitions. The wrapper now resets its download baseline when install state changes, computes per-tick bytes only from monotonic progress, and clears speed/time-left values appropriately. It also ensures completed installs report zero time left and clamp per-file progress to 100%.
Refactor GSP into a responsive multi-column layout while keeping informational sections full width
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
neon-nyan
left a comment
There was a problem hiding this comment.
Any changes to the BG-related so far. For the game settings related, still waiting for my game to be installed first.
| public sealed partial class PluginGameSettingsPage | ||
| { | ||
| private readonly GameSettingsExtension.GameSettingsContext _context; | ||
| private readonly TextBlock _statusText = new() |
There was a problem hiding this comment.
Bug: The _statusText TextBlock, intended for displaying plugin setting errors, is never added to the visual tree, so error messages are invisible to the user.
Severity: MEDIUM
Suggested Fix
The _statusText TextBlock should be added to a visible parent container within the page's XAML layout, such as a Grid or StackPanel. This will ensure that when its Text property is updated with an error message, it is rendered and becomes visible to the user.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/PluginGameSettingsPage.cs#L31
Potential issue: In `PluginGameSettingsPage`, a `TextBlock` named `_statusText` is
instantiated to display error messages that occur when a plugin setting is changed.
However, this control is never added to the page's visual tree. When a user interacts
with a setting and the plugin's `_context.SetValue()` method throws an exception, the
`SetStatus(ex.Message, true)` method is called. This updates the `Text` property of
`_statusText`, but because the control is not rendered, the error message remains
invisible to the user, leading to silent failures.
Also affects:
CollapseLauncher/XAMLs/MainApp/Pages/GameSettingsPages/PluginGameSettingsPage.cs:279~296
- Extract FFmpeg decoder checks into `RequiresFFmpegDecoder` and reuse it across codec detection and loader paths. - Treat 10-bit YUV420 (`AV_PIX_FMT_YUV420P10LE/BE`) as requiring FFmpeg, improving handling for High 10 H.264 backgrounds that Windows decoders may not support. - Tighten background reload behavior by comparing decoder mode before skipping reloads. - Layer setup now starts hidden, restores opacity after attach, and only sets a foreground overlay for video backgrounds.
- Improves `LayeredBackgroundImage` video initialization robustness by logging `MediaFailed` events, handling stale/invalid playback session size reads, and making render-target setup fail-safe with explicit success/failure returns. - Add proper native interface acquisition for DrawImageToRect, ensures acquired COM references are released correctly, detaches NaturalVideoSizeChanged on teardown, and clears frame player state during disposal to prevent leaks and stale callbacks.
- Improve LayeredBackgroundImage media handling to avoid race conditions and invalid state during video setup. - Render target initialization now fails safely and resets init state, FFmpeg source opening validates the active player before wiring it, and media-open flow now responds to natural size changes before creating the frame image. - Fix UI layering by hiding the foreground grid for static backgrounds (and restoring it for normal mode), and allows non-autoplay video to start when play was explicitly requested.
Use GameSettingsPageBase
+ Change CanvasVirtualImageSource -> CanvasImageSource + Simplify atomic check on the renderer state + Handle device lost and context lost catch correctly + Remove lock-based spin
Still had issues with hard crash while trying to re-create the device context for the CanvasImageSource
The .Dispose() still require to be called from the UI thread
|
As per internal discussion, this PR is approved. Merging for now |
 # Preview 1.84.7 (Codename: Columbina) # What's Changed? - 1.84.7 ## **[New]** [Game Settings Subsystem Support for Supported Plugin-based Games](#900), by @Cryotechnic We have implemented a new Update 6 extension for v1 API Standard. The plugin developer could now add customizations to the game into Collapse Launcher. To see the example of the implementation, see the source code of our Wuthering Waves plugin [here](https://github.com/CollapseLauncher/Hi3Helper.Plugin.Wuwa/tree/main/Hi3Helper.Plugin.Wuwa/Management/Settings). <img width="962" height="541" alt="image" src="https://github.com/user-attachments/assets/1f668111-fbf7-445a-b90c-70c1693ba87b" /> ## **[Imp]** [Optimizing Background Video/Image Renderer](#915), by @neon-nyan Optimizing the Background Video/Image Load routines and provides better memory allocation after dispose/use of each frames. The following PR also provides major improvements on the frame renderer for the background video playback, including direct GPU drawn to the frame's IDirect3DTexture outside of the UI thread, which reduces the VRAM usage and (hopefully) stutters. ### Video Background Playing (Honkai Impact 3rd - Mainland China - Picture 2 1080p) | Mem: Current Release | Mem: This PR | VRAM: Current Release | VRAM: This PR | |----|----|----|----| |  |  |  |  | ### Video Background On-Pause/Window minimized (Custom Video 2160p) | Mem: Current Release | Mem: This PR | VRAM: Current Release | VRAM: This PR | |----|----|----|----| |  |  |  |  | - **[Fix]** Race Conditions in Sophon API Loader causing Available Game Version reverted to Deprecated ZIP API, by @neon-nyan - **[New]** Sync game settings to database by @bagusnl, @neon-nyan - Now users with DB subsystem set-up can backup their game settings to the configured DB endpoint. Uses Collapse' way of saving registry so storage shouldn't be a problem. - Guide on setting Collapse' DB subsystem is here https://collapselauncher.com/feature/database.html - **[Imp]** DiscordRPC fixes and stability improvements by @neon-nyan - **[Imp]** Improved Collapse settings loading time by initializing Waifu2x at startup time by @neon-nyan - **[Imp]** Improved video background playback by reducing animation in carousel by @neon-nyan - Should be smoother and less prone of frame skip now - **[Imp]** Background CPU and Memory utilizations by @neon-nyan - CPU utilization should be next to 0 when Collapse is minimized (and to tray) by hiding WinUI elements. - Memory utilization is improved by running more aggressive garbage-collections - **[Fix]** Region without static images uses last loaded region background resources by @neon-nyan <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
 # Stable 1.84.7 (Codename: Columbina) # What's Changed? - 1.84.7 ## **[New]** [Game Settings Subsystem Support for Plugin-based Games](#900), by @Cryotechnic We have implemented a new Update 6 extension for v1 API Standard. The plugin developer could now add customizations to the game into Collapse Launcher. To see the example of the implementation, see the source code of our Wuthering Waves plugin [here](https://github.com/CollapseLauncher/Hi3Helper.Plugin.Wuwa/tree/main/Hi3Helper.Plugin.Wuwa/Management/Settings). <img width="962" height="541" alt="image" src="https://github.com/user-attachments/assets/1f668111-fbf7-445a-b90c-70c1693ba87b" /> ## **[Imp]** [Optimizing Background Video/Image Renderer](#915), by @neon-nyan Optimizing the Background Video/Image Load routines and provides better memory allocation after dispose/use of each frames. The following PR also provides major improvements on the frame renderer for the background video playback, including direct GPU drawn to the frame's IDirect3DTexture outside of the UI thread, which reduces the VRAM usage and (hopefully) stutters. ### Video Background Playing (Honkai Impact 3rd - Mainland China - Picture 2 1080p) | Mem: Current Release | Mem: This PR | VRAM: Current Release | VRAM: This PR | |----|----|----|----| |  |  |  |  | ### Video Background On-Pause/Window minimized (Custom Video 2160p) | Mem: Current Release | Mem: This PR | VRAM: Current Release | VRAM: This PR | |----|----|----|----| |  |  |  |  | - **[Fix]** Race Conditions in Sophon API Loader causing Available Game Version reverted to Deprecated ZIP API, by @neon-nyan - **[New]** Sync game settings to database by @bagusnl, @neon-nyan - Now users with DB subsystem set-up can backup their game settings to the configured DB endpoint. Uses Collapse' way of saving registry so storage shouldn't be a problem. - Guide on setting Collapse' DB subsystem is here https://collapselauncher.com/feature/database.html - **[Imp]** DiscordRPC fixes and stability improvements by @neon-nyan - **[Imp]** Improved Collapse settings loading time by initializing Waifu2x at startup time by @neon-nyan - **[Imp]** Improved video background playback by reducing animation in carousel by @neon-nyan - Should be smoother and less prone of frame skip now - **[Imp]** Background CPU and Memory utilizations by @neon-nyan - CPU utilization should be next to 0 when Collapse is minimized (and to tray) by hiding WinUI elements. - Memory utilization is improved by running more aggressive garbage-collections - **[Fix]** Region without static images uses last loaded region background resources by @neon-nyan <details> <summary>Changelog Prefixes</summary> ``` **[New]** **[Imp]** **[Fix]** **[Loc]** **[Doc]** ``` </details>
Main Goal
Add declarative plugin-defined game settings support to Plugin.Core and render those settings in Collapse.
Also harden plugin integration by:
PR Status
Changelog