Qt: remove duplicate entries on resolutions menu#14289
Qt: remove duplicate entries on resolutions menu#14289jasaaved wants to merge 1 commit intoPCSX2:masterfrom
Conversation
When querying display information, entries could be duplicated because DXGI returns one entry per combination of scanline ordering and scaling for the same resolution and refresh rate. For example, 1920x1080 @ 60Hz may appear multiple times with combinations such as progressive + unspecified scaling, unspecified + centered scaling, and unspecified + stretched scaling. Since only the resolution and refresh rate are used, duplicates are now excluded. Also added per-monitor grouping to the fullscreen mode list, so users can select a resolution and refresh rate for any connected display, not just their primary.
For me, PCSX2 will fullscreen on the same window that the main window is on, does that not happen for you? |
No. When I render to main, I could move the main window to my second monitor and it would still launch on my primary. Tried it with a different branch just in case it wasn't the code I did, and I had the same behavior. I'll try again a bit later once I have access to my PC again just to make sure. Rendering on a separate window works fine though. I can move that to a different monitor, fullscreen it, and it stays there. |
Assuming you are on Windows (10 or 11?) what are your settings? |
Windows 11 |
|
I tested it again, using nightly. I still observe the same behavior. I know the fix for it. I can include in this PR or a separate one without the monitor selector code from my other PR. |
I'm not able to reproduce the issue across 2 different Windows 11 machines using nightly. |
Sure, split it off into its own pr and it can be looked at further. |

Description of Changes
When querying display information, entries could be duplicated because DXGI returns one entry per combination of scanline ordering and scaling for the same resolution and refresh rate. For example, 1920x1080 @ 60Hz may appear multiple times with combinations such as progressive + unspecified scaling, unspecified + centered scaling, and unspecified + stretched scaling. The UI only showed the resolution and refresh rate so they showed duplicate entries. In code, scanline order and scaling are not used so it didn't matter which of these were picked, so this PR removes those duplicates.
Also added per-monitor grouping to the fullscreen mode list, so users can select a resolution and refresh rate for any connected display, not just their primary.
Rationale behind Changes
Previously, the fullscreen mode dropdown could show duplicate entries for the same resolution and refresh rate. Additionally, users had no way to select modes for a non-primary monitor when launching fullscreen on a secondary display.
Suggested Testing Steps
Did you use AI to help find, test, or implement this issue or feature?
Yes for helping with Qt implementation and constructing the friendly name of a monitor.
Before:

After:

One known issue I have encountered: rendering to main seems to always launch on the primary monitor, so there's no reason to choose a resolution/refresh rate from a secondary monitor in that case. This should be fixed in my other PR for monitor selection, but I can also revert this change in this PR to only show information from the primary monitor.