dolphin/Source/Core
Dentomologist f7b7267993 PerformanceMetrics: Fix automatic graph resizing
Fix a bug causing the performance graph to not resize when the render
window changed size:
* When changing the render window size during emulation the performance
  graph wouldn't update its size until the next emulation session.
* When changing the render window size with no emulation active (by
  changing the Internal Resolution with Auto-Adjust Window Size enabled)
  the performance graph wouldn't update its size until the second
  emulation session after the change.

Before explaining why the bug happened, here are some details about Dear
ImGui (henceforth ImGui) for context:
* In order to allow programs to specify initial ImGui window sizes while
  also allowing the user to resize them, `SetNextWindowSize` takes a
  flag from the `ImGuiCond_` enum specifying under what circumstances
  that function should actually have any effect.
* ImGuiCond_FirstUseEver causes ImGui to only apply the command when the
  window doesn't have any saved size information for that session or in
  the ini file specified by `ImGui::GetIO().IniFilename`. Since we set
  that filename to `nullptr`, in practice the resize command is applied
  on the first frame of each ImGui/emulation session.
* Qt saves the most recent size of the render window across emulation
  (and even Dolphin) sessions, which is then used to set the initial
  value of `ImGui::GetIO().DisplaySize` in the next emulation session.
* It takes multiple frames for the size of the render window to update
  when changed by setting the internal resolution. This means that
  `ImGui::GetIO().DisplaySize` will have a stale value in the
  intervening frames, and specifically for the first few frames of
  emulation if the resolution was changed beforehand.

When changing the resolution during emulation the call to
`SetNextWindowSize` had no effect because of the
`ImGuiCond_FirstUseEver` flag. `DisplaySize` would be updated several
frames later, and then the next emulation session would update the graph
size on its first frame.

When changing the resolution outside emulation and then starting a game,
the call to SetNextWindowSize on the first frame took effect but used
the stale value of `DisplaySize`. `DisplaySize` would be updated a few
frames later, but the graph wouldn't be resized until the first frame of
the second emulation session.

This commit fixes the issue by using the `ImGuiCond_Always` flag in the
performance graph's call to `SetNextWindowSize` when the render window
size changes.
2026-02-06 13:30:48 -08:00
..
AudioCommon feat: Add an option to preserve audio pitch when emulation speed changes, integrating it into core configuration and both Qt and Android UIs. 2026-01-27 18:48:22 -05:00
Common Merge pull request #13768 from JosJuice/page-table-fastmem-2 2026-02-04 16:20:35 -05:00
Core Merge pull request #13768 from JosJuice/page-table-fastmem-2 2026-02-04 16:20:35 -05:00
DiscIO RiivolutionParser: Fix XML Param Parsing 2026-02-06 18:06:27 +01:00
DolphinNoGUI Merge pull request #14214 from JoshuaVandaele/cmake-nonbreaking-improvements 2026-01-25 18:33:46 -08:00
DolphinQt WiiSpeakWindow: Add missing Dolphin icon 2026-02-06 16:31:09 +04:00
DolphinTool Merge pull request #14214 from JoshuaVandaele/cmake-nonbreaking-improvements 2026-01-25 18:33:46 -08:00
InputCommon InputConfig: Remove unused local variables 2026-01-26 11:36:42 -08:00
MacUpdater Merge pull request #14036 from TellowKrinkle/SkipPostprocess 2026-01-25 22:01:29 -05:00
UICommon Merge pull request #13594 from jordan-woyak/state-cleanups 2026-02-03 16:50:52 -06:00
UpdaterCommon Fix various typos and spelling mistakes 2026-01-17 20:11:38 +01:00
VideoBackends Merge pull request #14302 from oltolm/opengl_assert 2026-01-25 21:06:57 -05:00
VideoCommon PerformanceMetrics: Fix automatic graph resizing 2026-02-06 13:30:48 -08:00
WinUpdater
CMakeLists.txt
DolphinLib.ARM64.props
DolphinLib.props Common: Add TransferableSharedMutex class and unit tests. 2026-01-19 21:56:59 -06:00
DolphinLib.vcxproj
DolphinLib.vcxproj.user
DolphinLib.x64.props
VersionInfo.plist.in