Allow resizing by default and recreate swapchain on resize #763

Manually merged
github merged 5 commits from gh-pr/763/head into gh-pr/763/base 2026-11-26 09:31:55 +00:00
Owner

@⁠fayaz12g on GitHub · 2026-09-22 03:47 UTC · original
fayaz12g:main → main · +33 −15 · 2 files · 5 commits · merged 2026-09-23 13:49 UTC

Allow the emulator window to be resized from launch, including when starting in fullscreen. Recreate the Vulkan swapchain when the drawable pixel size changes so the presented image fills the resized window.

This supports ultrawide gameplay when a game patch renders at that aspect ratio. Resizing alone stretches the existing image; it does not change the game's rendering aspect ratio. The separate --stretch option and launcher checkbox are no longer needed.

The original Astro Bot ultrawide/any aspect ratio patch can be generated at https://aar.fayaz.one (with options to add existing community patches).

Screenshots from the original PR:

Screenshot 2026-09-21 231140 image Screenshot 2026-09-21 231350 Screenshot 2026-09-21 233527

Build checked with cmake --build _Build/sdl3 --target kyty_emulator -j 4.

**@⁠fayaz12g** on GitHub · 2026-09-22 03:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/763) `fayaz12g:main` → `main` · +33 −15 · 2 files · 5 commits · merged 2026-09-23 13:49 UTC Allow the emulator window to be resized from launch, including when starting in fullscreen. Recreate the Vulkan swapchain when the drawable pixel size changes so the presented image fills the resized window. This supports ultrawide gameplay when a game patch renders at that aspect ratio. Resizing alone stretches the existing image; it does not change the game's rendering aspect ratio. The separate `--stretch` option and launcher checkbox are no longer needed. The original Astro Bot ultrawide/any aspect ratio patch can be generated at https://aar.fayaz.one (with options to add existing community patches). Screenshots from the original PR: <img width="3439" height="1439" alt="Screenshot 2026-09-21 231140" src="https://github.com/user-attachments/assets/a41baf83-673d-4df2-b88b-36ff547811f0" /> <img width="3439" height="1439" alt="image" src="https://github.com/user-attachments/assets/384b1446-93f3-4ad5-be96-2c40bc11c76f" /> <img width="3439" height="1439" alt="Screenshot 2026-09-21 231350" src="https://github.com/user-attachments/assets/7107220b-b306-4e9b-935c-1d34d924a6ae" /> <img width="1003" height="413" alt="Screenshot 2026-09-21 233527" src="https://github.com/user-attachments/assets/6cb232a6-43e8-4b05-9104-c2ff2a8e832c" /> Build checked with `cmake --build _Build/sdl3 --target kyty_emulator -j 4`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:31:54 +00:00
github manually merged commit e12fe9e2c0 into gh-pr/763/base 2026-11-26 09:31:55 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-22 03:51 UTC · original · edited 2026-09-23 13:50 UTC

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c57de5a1-2017-4bc3-aca7-10fcbe1e21fa

📥 Commits

Reviewing files that changed from the base of the PR and between 2bfb929ca4 and bf5a6d2c6c.

📒 Files selected for processing (1)
  • src/launcher/include/configuration.h

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The launcher adds a Stretch to window checkbox. Its value is loaded from and saved to Configuration and QSettings. When enabled, the launcher adds --stretch to emulator arguments. ParseArgs recognizes the flag and enables ConfigOptions::window_stretch_enabled. The common configuration API exposes the setting through Config::WindowStretchEnabled(). WindowCreate uses this setting to control SDL window resizing.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to bf5a6

The stretch option is discoverable, persisted, propagated, and applied correctly; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title is related to the changes because it describes window resizing. It is not fully precise because the changes add an opt-in --stretch setting rather than enabling resizing by default, and th…
Description check ✅ Passed The description is related to the changes and explains window resizing, stretching, and ultrawide support. It conflicts with the changes by stating that --stretch and the launcher checkbox are no lo…

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

**@⁠coderabbitai[bot]** on GitHub · 2026-09-22 03:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/763#issuecomment-5770946585) · edited 2026-09-23 13:50 UTC <!-- 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/763"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> Navigate logical layers of code changes, visualize relationships, and explore their blast radius. <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `c57de5a1-2017-4bc3-aca7-10fcbe1e21fa` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 2bfb929ca4aa33df90286cc0e31d56e42b2d2f09 and bf5a6d2c6c192e0fee6ead4e3ad571c8003b7c2b. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `src/launcher/include/configuration.h` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 9 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The launcher adds a `Stretch to window` checkbox. Its value is loaded from and saved to `Configuration` and `QSettings`. When enabled, the launcher adds `--stretch` to emulator arguments. `ParseArgs` recognizes the flag and enables `ConfigOptions::window_stretch_enabled`. The common configuration API exposes the setting through `Config::WindowStretchEnabled()`. `WindowCreate` uses this setting to control SDL window resizing. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"bf5a6d2c6c192e0fee6ead4e3ad571c8003b7c2b" --> **Change:** Feature <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `bf5a6` <!-- final_review_risk_coverage:{"sourceCommitId":"bf5a6d2c6c192e0fee6ead4e3ad571c8003b7c2b","coveredCommitId":"bf5a6d2c6c192e0fee6ead4e3ad571c8003b7c2b","kind":"reviewed"} --> The stretch option is discoverable, persisted, propagated, and applied correctly; no actionable merge risk remains. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ 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 7 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 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. | | Title check | ✅ Passed | The title is related to the changes because it describes window resizing. It is not fully precise because the changes add an opt-in `--stretch` setting rather than enabling resizing by default, and th… | | Description check | ✅ Passed | The description is related to the changes and explains window resizing, stretching, and ultrawide support. It conflicts with the changes by stating that `--stretch` and the launcher checkbox are no lo… | </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> --- <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-22 03:51 UTC · original · reviewed

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Document --stretch in PrintUsage(). · main.cpp:58

src/main.cpp:58
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document --stretch in PrintUsage().

ParseArgs() accepts --stretch, but PrintUsage() does not list it. Users who run kyty_emulator --help cannot discover the new option. Add a valueless --stretch entry to the usage text.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: dc379afc-05f2-475e-91ad-67668f9a8187

📥 Commits

Reviewing files that changed from the base of the PR and between ba55ba5dc5 and 7ea431a5b3e676a25c4ce493f7c358c0f9819ffa.

📒 Files selected for processing (7)
  • src/common/emulatorConfig.cpp
  • src/common/emulatorConfig.h
  • src/launcher/forms/configuration_edit_dialog.ui
  • src/launcher/include/configuration.h
  • src/launcher/src/configurationEditDialog.cpp
  • src/launcher/src/mainDialog.cpp
  • src/main.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-22 03:51 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/763#pullrequestreview-5273975992) · **reviewed** > [!CAUTION] > Some comments are outside the diff and can’t be posted inline due to GitHub limitations. > > **⚠️ Outside diff range comments (1)** > > <details> > <summary><em>🟡 Minor</em> · Document <code>--stretch</code> in <code>PrintUsage()</code>. · <code>main.cpp:58</code></summary><blockquote> > > `src/main.cpp:58` > _📐 Maintainability & Code Quality_ | _🟡 Minor_ | _⚡ Quick win_ > > **Document `--stretch` in `PrintUsage()`.** > > `ParseArgs()` accepts `--stretch`, but `PrintUsage()` does not list it. Users who run `kyty_emulator --help` cannot discover the new option. Add a valueless `--stretch` entry to the usage text. > > <!-- cr-comment:v1:82394c320cd58f06e68fcd6f --> > > </blockquote></details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `dc379afc-05f2-475e-91ad-67668f9a8187` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between ba55ba5dc541db1920c60f3e2f8dd0c6420dca8e and 7ea431a5b3e676a25c4ce493f7c358c0f9819ffa. </details> <details> <summary>📒 Files selected for processing (7)</summary> * `src/common/emulatorConfig.cpp` * `src/common/emulatorConfig.h` * `src/launcher/forms/configuration_edit_dialog.ui` * `src/launcher/include/configuration.h` * `src/launcher/src/configurationEditDialog.cpp` * `src/launcher/src/mainDialog.cpp` * `src/main.cpp` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 9 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Author
Owner

@⁠fayaz12g on GitHub · 2026-09-22 03:58 UTC · original

Document --stretch in PrintUsage().

ParseArgs() accepts --stretch, but PrintUsage() does not list it. Users who run kyty_emulator --help cannot discover the new option. Add a valueless --stretch entry to the usage text.

Addressed.

**@⁠fayaz12g** on GitHub · 2026-09-22 03:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/763#issuecomment-5770999454) > Document --stretch in PrintUsage(). > > ParseArgs() accepts --stretch, but PrintUsage() does not list it. Users who run kyty_emulator --help cannot discover the new option. Add a valueless --stretch entry to the usage text. Addressed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.