mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2943] [MERGED] Improve Integer Scaling and Native Resolution Screenshot behavior #1370
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:master📝 Commits (2)
51d1587Improve Integer Scaling behaviorafaedfeRevert "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.