[PR #2891] [CLOSED] Add option to disable CRT aspect ratio accuracy correction #1292

Open
opened 2026-01-29 19:16:14 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/2891
Author: @Superstarxalien
Created: 9/22/2022
Status: Closed

Base: masterHead: master


📝 Commits (2)

  • e7a7b1e Add option to disable CRT aspect ratio accuracy correction
  • 8ddc203 remove bit of code from earlier version

📊 Changes

14 files changed (+52 additions, -9 deletions)

View changed files

📝 src/core/gpu.cpp (+10 -0)
📝 src/core/gpu.h (+2 -0)
📝 src/core/gpu_hw_d3d11.cpp (+2 -1)
📝 src/core/gpu_hw_d3d12.cpp (+2 -1)
📝 src/core/gpu_hw_opengl.cpp (+2 -1)
📝 src/core/gpu_hw_vulkan.cpp (+2 -1)
📝 src/core/gpu_sw.cpp (+2 -1)
📝 src/core/host_display.cpp (+9 -2)
📝 src/core/host_display.h (+5 -1)
📝 src/core/settings.cpp (+2 -0)
📝 src/core/settings.h (+1 -0)
📝 src/duckstation-qt/displaysettingswidget.cpp (+1 -0)
📝 src/duckstation-qt/displaysettingswidget.ui (+8 -1)
📝 src/frontend-common/fullscreen_ui.cpp (+4 -0)

📄 Description

DuckStation's aspect ratio stretching doesn't actually stretch the game display to match the resolution of the ratio, e.g. a game doesn't get stretched to 320x240 when the aspect ratio is set to 4:3, as it also makes the image thinner to more closely match what is displayed on CRTs, i.e. a 512px-framebuffer game set to 4:3 will be 292 pixels wide. Some games are built around the actual aspect ratio displayed on CRT screens, and for the games that aren't I added a setting for retaining the ordinary aspect ratio.

Notes:
Labelled as "CRT Pillarboxing" in settings, but it might need a better name. It also lacks a description in both Qt UI and big picture mode.
While I made sure the code worked for every aspect ratio, resolution upscale, and crop mode, two errors slipped past myself at the last minute: the display is erroneously stretched when the aspect ratio is set to 1:1 PAR, and when the "Stretch To Fill" setting is enabled, it doesn't fill the entire screen, meaning there will often be a sort of letterboxing effect.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/2891 **Author:** [@Superstarxalien](https://github.com/Superstarxalien) **Created:** 9/22/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`e7a7b1e`](https://github.com/stenzek/duckstation/commit/e7a7b1ed27eae0b177dc46d0084d01513aefccd9) Add option to disable CRT aspect ratio accuracy correction - [`8ddc203`](https://github.com/stenzek/duckstation/commit/8ddc2036180e5f106757bc3a6310bc9ce0a52a60) remove bit of code from earlier version ### 📊 Changes **14 files changed** (+52 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/core/gpu.cpp` (+10 -0) 📝 `src/core/gpu.h` (+2 -0) 📝 `src/core/gpu_hw_d3d11.cpp` (+2 -1) 📝 `src/core/gpu_hw_d3d12.cpp` (+2 -1) 📝 `src/core/gpu_hw_opengl.cpp` (+2 -1) 📝 `src/core/gpu_hw_vulkan.cpp` (+2 -1) 📝 `src/core/gpu_sw.cpp` (+2 -1) 📝 `src/core/host_display.cpp` (+9 -2) 📝 `src/core/host_display.h` (+5 -1) 📝 `src/core/settings.cpp` (+2 -0) 📝 `src/core/settings.h` (+1 -0) 📝 `src/duckstation-qt/displaysettingswidget.cpp` (+1 -0) 📝 `src/duckstation-qt/displaysettingswidget.ui` (+8 -1) 📝 `src/frontend-common/fullscreen_ui.cpp` (+4 -0) </details> ### 📄 Description DuckStation's aspect ratio stretching doesn't actually stretch the game display to match the resolution of the ratio, e.g. a game doesn't get stretched to 320x240 when the aspect ratio is set to 4:3, as it also makes the image thinner to more closely match what is displayed on CRTs, i.e. a 512px-framebuffer game set to 4:3 will be 292 pixels wide. Some games are built around the actual aspect ratio displayed on CRT screens, and for the games that aren't I added a setting for retaining the ordinary aspect ratio. Notes: Labelled as "CRT Pillarboxing" in settings, but it might need a better name. It also lacks a description in both Qt UI and big picture mode. While I made sure the code worked for every aspect ratio, resolution upscale, and crop mode, two errors slipped past myself at the last minute: the display is erroneously stretched when the aspect ratio is set to 1:1 PAR, and when the "Stretch To Fill" setting is enabled, it doesn't fill the entire screen, meaning there will often be a sort of letterboxing effect. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:16:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#1292