Make trophy toast duration configurable (5-10s, default 6s) #1538

Manually merged
github merged 1 commit from gh-pr/1538/head into gh-pr/1538/base 2026-11-26 09:59:01 +00:00
Owner

@⁠Pipe530 on GitHub · 2026-10-15 19:49 UTC · original
Pipe530:pipe530-trophy-toast-duration-setting → main · +47 −1 · 9 files · 1 commits · merged 2026-10-15 23:37 UTC

Adds a "Trophy notification duration" setting to the launcher settings dialog (global or per game), replacing the fixed 5s toast lifetime.

  • Range: 5-10 seconds, default 6.
  • Launcher passes it to the emulator via new --trophy-duration <seconds> option.
  • Emulator clamps to 5-10; launcher validates the same range.
**@⁠Pipe530** on GitHub · 2026-10-15 19:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1538) `Pipe530:pipe530-trophy-toast-duration-setting` → `main` · +47 −1 · 9 files · 1 commits · merged 2026-10-15 23:37 UTC Adds a "Trophy notification duration" setting to the launcher settings dialog (global or per game), replacing the fixed 5s toast lifetime. - Range: 5-10 seconds, default 6. - Launcher passes it to the emulator via new `--trophy-duration <seconds>` option. - Emulator clamps to 5-10; launcher validates the same range.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:58:59 +00:00
github manually merged commit b420860e6d into gh-pr/1538/base 2026-11-26 09:59:01 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-15 19:54 UTC · original

Review in Change Stack →

📝 Walkthrough

The launcher adds a trophy notification duration setting with a default of 6 seconds and a permitted range of 5–10 seconds. It stores the value in configuration and passes it to the emulator as --trophy-duration. The emulator parses the option, clamps the configured value through Config::GetTrophyDurationSeconds(), and uses it to set trophy notification expiration and fade-out timing.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Feature

Merge Risk: 🔵 Low · up to b4208

Existing profiles show trophy toasts for five seconds rather than the new six-second default. This is a bounded, one-second behavior difference; correct the fallback before merging if preserving the stated default is required.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: configurable trophy toast duration with the supported range and default value.
Description check Passed The description directly explains the new setting, validation range, default value, launcher argument, and emulator behavior.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-15 19:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1538#issuecomment-6201005985) <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1538?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> <dl> <dd> The launcher adds a trophy notification duration setting with a default of 6 seconds and a permitted range of 5–10 seconds. It stores the value in configuration and passes it to the emulator as `--trophy-duration`. The emulator parses the option, clamps the configured value through `Config::GetTrophyDurationSeconds()`, and uses it to set trophy notification expiration and fade-out timing. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"b420860e6d193cc0e4a3a66953abed123d68d91f" --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong>🔵 Low</strong> · up to <code>b4208</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `b4208` --> <!-- final_review_risk_coverage:{"sourceCommitId":"b420860e6d193cc0e4a3a66953abed123d68d91f","coveredCommitId":"b420860e6d193cc0e4a3a66953abed123d68d91f","kind":"reviewed"} --> Existing profiles show trophy toasts for five seconds rather than the new six-second default. This is a bounded, one-second behavior difference; correct the fallback before merging if preserving the stated default is required. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 files. (1 skipped: 1… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely describes the main change: configurable trophy toast duration with the supported range and default value. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the new setting, validation range, default value, launcher argument, and emulator behavior. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 files. (1 skipped: 1 unsupported.) </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1538)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-15 19:54 UTC · original · reviewed

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d3ef5cc-d39d-4eb2-bb5c-87095f4e7362
📥 Commits

Reviewing files that changed from the base of the PR and between 9e41d8320a and b420860e6d.

📒 Files selected for processing: 9
  • src/common/emulatorConfig.cpp
  • src/common/emulatorConfig.h
  • src/graphics/presentation/systemOverlay.cpp
  • src/launcher/forms/configuration_edit_dialog.ui
  • src/launcher/include/configuration.h
  • src/launcher/src/configuration.cpp
  • src/launcher/src/configurationEditDialog.cpp
  • src/launcher/src/mainDialog.cpp
  • src/main.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-15 19:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1538#pullrequestreview-5539078908) · **reviewed** **Actionable comments posted: 1** --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `1d3ef5cc-d39d-4eb2-bb5c-87095f4e7362` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 9e41d8320a2774b303fbad344c2347e8d0292e83 and b420860e6d193cc0e4a3a66953abed123d68d91f. </details> <details> <summary>📒 Files selected for processing: 9</summary> * `src/common/emulatorConfig.cpp` * `src/common/emulatorConfig.h` * `src/graphics/presentation/systemOverlay.cpp` * `src/launcher/forms/configuration_edit_dialog.ui` * `src/launcher/include/configuration.h` * `src/launcher/src/configuration.cpp` * `src/launcher/src/configurationEditDialog.cpp` * `src/launcher/src/mainDialog.cpp` * `src/main.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=4014a02e-fc70-40c0-9357-26a7e91b7174 attempt=ca3c46aa-7c7e-47ac-a197-172b33a76f74 batch=1/1 -->
@ -63,6 +64,7 @@ void Configuration::ReadGameSettingsValues(const Settings& s) {
KYTY_CFG_GET(sync_raw_image_buffers);
KYTY_CFG_GET(tessellation_enabled);
trophy_enabled = s.value("trophy_enabled", trophy_enabled).toBool();
KYTY_CFG_GET(trophy_duration_seconds);
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-15 19:54 UTC · original

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n 'KYTY_CFG_GET|trophy_duration_seconds|ReadGameSettingsValues|CreateEmulatorArgs|GetTrophyDurationSeconds' src/launcher/src/configuration.cpp src/launcher/include/configuration.h src/launcher/src/mainDialog.cpp src/common/emulatorConfig.cpp src/main.cpp src/graphics/presentation/systemOverlay.cpp
sed -n '1,95p' src/launcher/src/configuration.cpp
sed -n '135,165p' src/launcher/src/configuration.cpp
git diff 9e41d8320a2774b303fbad344c2347e8d0292e83 b420860e6d193cc0e4a3a66953abed123d68d91f -- src/launcher/src/configuration.cpp src/launcher/include/configuration.h src/launcher/src/mainDialog.cpp src/common/emulatorConfig.cpp src/main.cpp src/graphics/presentation/systemOverlay.cpp

Repository: KytyPS5/KytyPS5

Length of output: 13745


🏁 Script executed:

sed -n '35,145p' src/launcher/src/configuration.cpp
sed -n '200,275p' src/launcher/include/configuration.h
rg -n -F --glob '*.{cpp,h,hpp}' -e 'trophy_duration_seconds' -e 'ReadGameSettingsValues(' -e 'SetGameSettings(' -e 'GameSettings()' src/launcher src/common src/main.cpp

Repository: KytyPS5/KytyPS5

Length of output: 7424


Preserve the 6-second default when loading an old profile.

When ReadSettings(QSettings*) loads a profile without trophy_duration_seconds, the direct read assigns 0 instead of preserving the initialized 6. The launcher passes 0, and the emulator clamps it to 5, so old profiles use 5-second toasts.

🐛 Suggested fix
--- "a/src/launcher/src/configuration.cpp"
+++ "b/src/launcher/src/configuration.cpp"
@@ -64,7 +64,9 @@
 	KYTY_CFG_GET(sync_raw_image_buffers);
 	KYTY_CFG_GET(tessellation_enabled);
 	trophy_enabled   = s.value("trophy_enabled", trophy_enabled).toBool();
-	KYTY_CFG_GET(trophy_duration_seconds);
+	trophy_duration_seconds =
+	    s.value(QStringLiteral("trophy_duration_seconds"), trophy_duration_seconds)
+	        .template value<decltype(trophy_duration_seconds)>();
 	KYTY_CFG_GET(skip_notice_screen);
 	KYTY_CFG_GET(network_connected);
 	vblank_frequency = s.value("vblank_frequency", vblank_frequency).toInt();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

	trophy_duration_seconds =
	    s.value(QStringLiteral("trophy_duration_seconds"), trophy_duration_seconds)
	        .template value<decltype(trophy_duration_seconds)>();
**@⁠coderabbitai[bot]** on GitHub · 2026-10-15 19:54 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1538#discussion_r4287635668) **🎯 Functional Correctness** | **🟡 Minor** | **⚡ Quick win** <details> <summary>🔎 Supported by static analysis</summary> 🏁 Script executed: ```bash rg -n 'KYTY_CFG_GET|trophy_duration_seconds|ReadGameSettingsValues|CreateEmulatorArgs|GetTrophyDurationSeconds' src/launcher/src/configuration.cpp src/launcher/include/configuration.h src/launcher/src/mainDialog.cpp src/common/emulatorConfig.cpp src/main.cpp src/graphics/presentation/systemOverlay.cpp sed -n '1,95p' src/launcher/src/configuration.cpp sed -n '135,165p' src/launcher/src/configuration.cpp git diff 9e41d8320a2774b303fbad344c2347e8d0292e83 b420860e6d193cc0e4a3a66953abed123d68d91f -- src/launcher/src/configuration.cpp src/launcher/include/configuration.h src/launcher/src/mainDialog.cpp src/common/emulatorConfig.cpp src/main.cpp src/graphics/presentation/systemOverlay.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 13745 --- 🏁 Script executed: ```bash sed -n '35,145p' src/launcher/src/configuration.cpp sed -n '200,275p' src/launcher/include/configuration.h rg -n -F --glob '*.{cpp,h,hpp}' -e 'trophy_duration_seconds' -e 'ReadGameSettingsValues(' -e 'SetGameSettings(' -e 'GameSettings()' src/launcher src/common src/main.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 7424 --- </details> **Preserve the 6-second default when loading an old profile.** When `ReadSettings(QSettings*)` loads a profile without `trophy_duration_seconds`, the direct read assigns `0` instead of preserving the initialized `6`. The launcher passes `0`, and the emulator clamps it to `5`, so old profiles use 5-second toasts. <details> <summary>🐛 Suggested fix</summary> ```diff --- "a/src/launcher/src/configuration.cpp" +++ "b/src/launcher/src/configuration.cpp" @@ -64,7 +64,9 @@ KYTY_CFG_GET(sync_raw_image_buffers); KYTY_CFG_GET(tessellation_enabled); trophy_enabled = s.value("trophy_enabled", trophy_enabled).toBool(); - KYTY_CFG_GET(trophy_duration_seconds); + trophy_duration_seconds = + s.value(QStringLiteral("trophy_duration_seconds"), trophy_duration_seconds) + .template value<decltype(trophy_duration_seconds)>(); KYTY_CFG_GET(skip_notice_screen); KYTY_CFG_GET(network_connected); vblank_frequency = s.value("vblank_frequency", vblank_frequency).toInt(); ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion trophy_duration_seconds = s.value(QStringLiteral("trophy_duration_seconds"), trophy_duration_seconds) .template value<decltype(trophy_duration_seconds)>(); ``` </details> <!-- suggestion_end --> <!-- fingerprinting:phantom:medusa:serval --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:40aeb74fc98087b82d6e4e23 --> <!-- This is an auto-generated comment by CodeRabbit -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.