FullscreenUI: Fix animation glitch on choice select

pull/3444/head
Stenzek 5 months ago
parent a8db46a6b8
commit d37048e4e4
No known key found for this signature in database

@ -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
{ {

Loading…
Cancel
Save