[PR #1227] [MERGED] GPU: Add auto aspect ratio and various fixes #396

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

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/1227
Author: @ggrtk
Created: 12/15/2020
Status: Merged
Merged: 12/17/2020
Merged by: @stenzek

Base: masterHead: auto-aspect-ratio


📝 Commits (7)

  • b8abf2d GPU: Don't apply display offsets when not cropping
  • 78e42d9 GPU: Clean up CRTC variable naming
  • 866cbdc GPU: Prevent potential overflow in CRTC visible area calculation
  • 1c8a896 GPU: Wrap display VRAM coordinates properly
  • 2c76ad2 GPU: Fix operator warning
  • b4fb1e2 Settings: Remove unused variables
  • de8f03b GPU: Add auto (game native) aspect ratio

📊 Changes

9 files changed (+147 additions, -78 deletions)

View changed files

📝 src/core/gpu.cpp (+104 -50)
📝 src/core/gpu.h (+27 -12)
📝 src/core/gte.cpp (+2 -0)
📝 src/core/host_display.cpp (+0 -1)
📝 src/core/settings.cpp (+5 -4)
📝 src/core/settings.h (+2 -6)
📝 src/core/types.h (+1 -0)
📝 src/duckstation-libretro/libretro_host_interface.cpp (+3 -2)
📝 src/duckstation-qt/displaysettingswidget.cpp (+3 -3)

📄 Description

Auto mode width is roughly 2% slimmer than 4:3 mode due to using GPU ticks/lines for calculation. We could probably fudge the numbers a bit to make it closer to forcing 4:3, but analog specs aren't super precise anyways so I won't bother with it for the time being.

Should resolve #1139, #1138, #654.


🔄 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/1227 **Author:** [@ggrtk](https://github.com/ggrtk) **Created:** 12/15/2020 **Status:** ✅ Merged **Merged:** 12/17/2020 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `auto-aspect-ratio` --- ### 📝 Commits (7) - [`b8abf2d`](https://github.com/stenzek/duckstation/commit/b8abf2df955fcba030e3c35e7924007a55ba2a25) GPU: Don't apply display offsets when not cropping - [`78e42d9`](https://github.com/stenzek/duckstation/commit/78e42d9b4cc23ded4d34b47d9f978509f3fc5473) GPU: Clean up CRTC variable naming - [`866cbdc`](https://github.com/stenzek/duckstation/commit/866cbdca4b907a1a8588ef4749e63d4d6761050b) GPU: Prevent potential overflow in CRTC visible area calculation - [`1c8a896`](https://github.com/stenzek/duckstation/commit/1c8a896a550a40533a68529fafd109683184fcc6) GPU: Wrap display VRAM coordinates properly - [`2c76ad2`](https://github.com/stenzek/duckstation/commit/2c76ad204a45c8858942c8561375dfc403032552) GPU: Fix operator warning - [`b4fb1e2`](https://github.com/stenzek/duckstation/commit/b4fb1e20d8d4b2e5170e58dce2f6d74ce06e4314) Settings: Remove unused variables - [`de8f03b`](https://github.com/stenzek/duckstation/commit/de8f03bd755f693f91c6ca4da43a7100c2043187) GPU: Add auto (game native) aspect ratio ### 📊 Changes **9 files changed** (+147 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `src/core/gpu.cpp` (+104 -50) 📝 `src/core/gpu.h` (+27 -12) 📝 `src/core/gte.cpp` (+2 -0) 📝 `src/core/host_display.cpp` (+0 -1) 📝 `src/core/settings.cpp` (+5 -4) 📝 `src/core/settings.h` (+2 -6) 📝 `src/core/types.h` (+1 -0) 📝 `src/duckstation-libretro/libretro_host_interface.cpp` (+3 -2) 📝 `src/duckstation-qt/displaysettingswidget.cpp` (+3 -3) </details> ### 📄 Description Auto mode width is roughly 2% slimmer than 4:3 mode due to using GPU ticks/lines for calculation. We could probably fudge the numbers a bit to make it closer to forcing 4:3, but analog specs aren't super precise anyways so I won't bother with it for the time being. Should resolve #1139, #1138, #654. --- <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:07:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#396