Launcher display options #1938

Manually merged
github merged 6 commits from gh-pr/1938/head into gh-pr/1938/base 2026-11-26 10:09:31 +00:00
Owner

@⁠shadowbeat070 on GitHub · 2026-10-27 15:10 UTC · original
shadowbeat070:launcher-display-options → main · +181 −46 · 10 files · 6 commits · merged 2026-10-27 20:59 UTC

Small miscellaneous fixes for the launcher windows and added cusom resolution support for games

Summary

07b72f45 launcher: make the settings dialog resizable and its tabs scrollable
18fb908f launcher: add a Stretch to window option
c604e299 launcher: accept custom screen resolutions such as 21:9
6f36581a graphics: keep the game's aspect ratio when presenting to the window
172ccd7e launcher: add minimize and maximize buttons to the main window

PR follows contribution guidelines and the Windows build is verified.

**@⁠shadowbeat070** on GitHub · 2026-10-27 15:10 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1938) `shadowbeat070:launcher-display-options` → `main` · +181 −46 · 10 files · 6 commits · merged 2026-10-27 20:59 UTC Small miscellaneous fixes for the launcher windows and added cusom resolution support for games ## Summary 07b72f45 launcher: make the settings dialog resizable and its tabs scrollable 18fb908f launcher: add a Stretch to window option c604e299 launcher: accept custom screen resolutions such as 21:9 6f36581a graphics: keep the game's aspect ratio when presenting to the window 172ccd7e launcher: add minimize and maximize buttons to the main window PR follows contribution guidelines and the Windows build is verified.
The main window is a QDialog, which on Windows only gets a close button.
The guest frame was blitted across the whole swapchain image, so a window
or fullscreen display whose shape differs from the frame stretched the
picture. Fit the frame inside the window instead and clear the remaining
bars to black. The video-out overlay layer is drawn into the same
rectangle so it stays aligned with the frame underneath.
The resolution was a fixed enum of four 16:9 sizes. Make the combo box
editable so any WIDTHxHEIGHT between 320 and 16384 can be entered, and
add ultrawide presets (2560x1080, 3440x1440, 3840x1600, 5120x2160).

Settings saved by older launchers stored the enum key ("R1920X1080");
NormalizeResolution still accepts that form, so they load unchanged.
Presentation now keeps the game's aspect ratio with black bars. Add
--stretch to fill the whole window as before, exposed in the launcher as
a "Stretch to window" checkbox under General, off by default.
The dialog had no maximize button and pinned its minimum width to its
initial 900 px, and without scroll areas it could not be made shorter
than its content. Add a maximize button (not minimize, since the dialog
is modal), drop the width pin, and wrap each tab page in a frameless
scroll area.

With the scroll areas the layout's minimum size no longer forces the
dialog open, so size it explicitly: grow it to fit the largest tab,
capped at the available screen, when there is no saved geometry and
whenever the global settings add the game folders panel.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:09:28 +00:00
github manually merged commit eb173156ac into gh-pr/1938/base 2026-11-26 10:09:31 +00:00
Author
Owner

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

Review in Change Stack →

Walkthrough

The change adds editable, validated resolution settings and an optional stretch setting. The launcher stores these settings and passes the corresponding resolution and --stretch option to the emulator. The swapchain fits frames and overlays to the window when stretching is off, with black clearing outside the fitted frame.

Suggested reviewers: nmzik

Priority: Normal

Change: Feature

Merge Risk: Low · up to 07b72

Older exported game configurations using legacy resolution keys can fail to import. This is a bounded compatibility issue to fix or explicitly accept before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… 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 identifies the launcher display-options changes, including window behavior, aspect-ratio handling, stretching, and custom resolutions.
Description check Passed The description directly relates to the changeset and lists the main launcher, resolution, and graphics-presentation updates.
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 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 22 functions across 9 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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-27 15:18 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1938#issuecomment-6445851424) <!-- coderabbit-ai-generated:v1 --> <!-- 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/1938?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 change adds editable, validated resolution settings and an optional stretch setting. The launcher stores these settings and passes the corresponding resolution and `--stretch` option to the emulator. The swapchain fits frames and overlays to the window when stretching is off, with black clearing outside the fitted frame. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <strong>Priority: <picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/priority-normal-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Normal</strong> <!-- change_assessment_commit:"07b72f45799d3458f74e81ed6b58969f33351458" --> **Change:** Feature <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-low-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Low</strong> · up to <code>07b72</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `07b72` --> <!-- final_review_risk_coverage:{"sourceCommitId":"07b72f45799d3458f74e81ed6b58969f33351458","coveredCommitId":"07b72f45799d3458f74e81ed6b58969f33351458","kind":"reviewed"} --> Older exported game configurations using legacy resolution keys can fail to import. This is a bounded compatibility issue to fix or explicitly accept before merging. <!-- 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 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… | 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 identifies the launcher display-options changes, including window behavior, aspect-ratio handling, stretching, and custom resolutions. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly relates to the changeset and lists the main launcher, resolution, and graphics-presentation updates. | | 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 4.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 22 functions across 9 files. (1 skipped: 1 unsupported.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </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=1938)! 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 -->
@ -50,2 +69,3 @@
#define KYTY_CFG_GET(n) n = s.value(QStringLiteral(#n)).template value<decltype(n)>()
KYTY_CFG_GET(screen_resolution);
const auto resolution = NormalizeResolution(s.value("screen_resolution").toString());
screen_resolution = resolution.isEmpty() ? QStringLiteral("1280x720") : resolution;
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 15:18 UTC · original · edited 2026-10-27 20:58 UTC

Minor · Data Integrity & Integration · Quick win

Accept legacy resolution values during game-config import.

When an older exported game config contains screen_resolution: "R1920X1080", this code stores 1920x1080. SetGameSettings then compares that value with the original string and rejects the import as invalid. The import workflow calls SetGameSettings for each game config. Normalize the resolution value before that comparison, while still rejecting values that fail validation. (raw.githubusercontent.com)

✅ Addressed in commit eb17315

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 15:18 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1938#discussion_r4390511409) · edited 2026-10-27 20:58 UTC <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor** · **Data Integrity & Integration** · **Quick win** **Accept legacy resolution values during game-config import.** When an older exported game config contains `screen_resolution: "R1920X1080"`, this code stores `1920x1080`. `SetGameSettings` then compares that value with the original string and rejects the import as invalid. The import workflow calls `SetGameSettings` for each game config. Normalize the resolution value before that comparison, while still rejecting values that fail validation. ([raw.githubusercontent.com](https://raw.githubusercontent.com/KytyPS5/KytyPS5/07b72f45799d3458f74e81ed6b58969f33351458/src/launcher/src/configurationListWidget.cpp)) <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:03a19cec60525ddfb6e88cf7 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit eb17315
Author
Owner

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

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 0685bffb2f and 07b72f4579.

Files selected for processing: 10
  • src/common/emulatorConfig.cpp
  • src/common/emulatorConfig.h
  • src/graphics/presentation/window/swapchain.cpp
  • src/launcher/forms/configuration_edit_dialog.ui
  • src/launcher/include/configuration.h
  • src/launcher/include/configurationEditDialog.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-27 15:18 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1938#pullrequestreview-5669587968) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/0685bffb2f060bf470aa8528a405ebbe17130076/.coderabbit.yaml>) - **Commit**: [0685bff](<https://github.com/KytyPS5/KytyPS5/commit/0685bffb2f060bf470aa8528a405ebbe17130076>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `41689c77-99e8-49fe-a2fd-a88f48fa8682` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 0685bffb2f060bf470aa8528a405ebbe17130076 and 07b72f45799d3458f74e81ed6b58969f33351458. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 10</summary> <dl> <dd> * `src/common/emulatorConfig.cpp` * `src/common/emulatorConfig.h` * `src/graphics/presentation/window/swapchain.cpp` * `src/launcher/forms/configuration_edit_dialog.ui` * `src/launcher/include/configuration.h` * `src/launcher/include/configurationEditDialog.h` * `src/launcher/src/configuration.cpp` * `src/launcher/src/configurationEditDialog.cpp` * `src/launcher/src/mainDialog.cpp` * `src/main.cpp` </dd> </dl> </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. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=57610dc9-b94b-4afc-a8b1-b151e390b4ed attempt=fe080cdd-b5cc-45d6-a302-af72c9c5d01b batch=1/1 -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.