[PR #2943] [MERGED] Improve Integer Scaling and Native Resolution Screenshot behavior #1370

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

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/2943
Author: @Superstarxalien
Created: 1/22/2023
Status: Merged
Merged: 1/30/2023
Merged by: @stenzek

Base: masterHead: master


📝 Commits (2)

  • 51d1587 Improve Integer Scaling behavior
  • afaedfe Revert "Improve Integer Scaling behavior" and instead offer as a setting

📊 Changes

5 files changed (+28 additions, -7 deletions)

View changed files

📝 src/core/host_display.cpp (+18 -7)
📝 src/core/settings.cpp (+2 -0)
📝 src/core/settings.h (+1 -0)
📝 src/duckstation-qt/advancedsettingswidget.cpp (+4 -0)
📝 src/frontend-common/fullscreen_ui.cpp (+3 -0)

📄 Description

as discussed in the PSX.DEV discord server

The problem: DuckStation currently stretches displays to match a given aspect ratio by stretching horizontally only; when enabling Integer Scaling, this means that you'll have a display of 292px width in games with 512px wide framebuffers, such as the entire Crash and Spyro series of games; at this point this can no longer be considered a "native" resolution, as image data is lost unlike what would happen when playing these games on a CRT.

What this PR does: Modifies the parts of the DuckStation display code that stretch the display by checking for if the final horizontally stretched display is lower in width than that of the unstretched display: if the width is lower, it increases the vertical dimension by the same rate instead. This means that games such as Crash Bandicoot, with framebuffers wider than that of the aspect ratio they're set to (e.g. 512x216), get increased vertically (e.g. 512x377) as opposed to being decreased horizontally (e.g. 292x216). Also affects games with 320x240 framebuffers as well, actually, as they get decreased to 292x240 to account for vertical overscan; they now get increased vertically as well.

This also modifies the Native Resolution Screenshot option by applying the same aforementioned improvements to what DuckStation considers to be the minimum resolution in a game. I also added an advanced setting to revert this behavior for both options back to what it is in current DuckStation.


🔄 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/2943 **Author:** [@Superstarxalien](https://github.com/Superstarxalien) **Created:** 1/22/2023 **Status:** ✅ Merged **Merged:** 1/30/2023 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`51d1587`](https://github.com/stenzek/duckstation/commit/51d1587b2117365e44cb947da4527430fb56d7de) Improve Integer Scaling behavior - [`afaedfe`](https://github.com/stenzek/duckstation/commit/afaedfedc9dcc490af939d9025ed140c36571550) Revert "Improve Integer Scaling behavior" and instead offer as a setting ### 📊 Changes **5 files changed** (+28 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/core/host_display.cpp` (+18 -7) 📝 `src/core/settings.cpp` (+2 -0) 📝 `src/core/settings.h` (+1 -0) 📝 `src/duckstation-qt/advancedsettingswidget.cpp` (+4 -0) 📝 `src/frontend-common/fullscreen_ui.cpp` (+3 -0) </details> ### 📄 Description as discussed in the PSX.DEV discord server **The problem:** DuckStation currently stretches displays to match a given aspect ratio by stretching horizontally only; when enabling Integer Scaling, this means that you'll have a display of 292px width in games with 512px wide framebuffers, such as the entire Crash and Spyro series of games; at this point this can no longer be considered a "native" resolution, as image data is lost unlike what would happen when playing these games on a CRT. **What this PR does:** Modifies the parts of the DuckStation display code that stretch the display by checking for if the final horizontally stretched display is lower in width than that of the unstretched display: if the width is lower, it increases the vertical dimension by the same rate instead. This means that games such as Crash Bandicoot, with framebuffers wider than that of the aspect ratio they're set to (e.g. 512x216), get increased vertically (e.g. 512x377) as opposed to being decreased horizontally (e.g. 292x216). Also affects games with 320x240 framebuffers as well, actually, as they get decreased to 292x240 to account for vertical overscan; they now get increased vertically as well. This also modifies the Native Resolution Screenshot option by applying the same aforementioned improvements to what DuckStation considers to be the minimum resolution in a game. I also added an advanced setting to revert this behavior for both options back to what it is in current DuckStation. --- <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:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#1370