FullscreenUI: Fix animation glitch on choice select

This commit is contained in:
Stenzek 2025-06-13 20:54:50 +10:00
parent a8db46a6b8
commit d37048e4e4
No known key found for this signature in database

View File

@ -2923,10 +2923,10 @@ void ImGuiFullscreen::ChoiceDialog::Draw()
// because the callback may open another dialog, and we don't want to close that one. // because the callback may open another dialog, and we don't want to close that one.
if (!m_checkable) if (!m_checkable)
{ {
const ChoiceDialogOptions options = std::exchange(m_options, ChoiceDialogOptions()); const auto selected = m_options[choice];
const ChoiceDialogCallback callback = std::exchange(m_callback, ChoiceDialogCallback()); const ChoiceDialogCallback callback = std::exchange(m_callback, ChoiceDialogCallback());
StartClose(); StartClose();
callback(choice, options[choice].first, options[choice].second); callback(choice, selected.first, selected.second);
} }
else else
{ {