mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 03:55:33 +00:00
FullscreenUI: Fix system not unpausing after HC disable popup
This commit is contained in:
parent
27fc7de07a
commit
e3cb3d029b
@ -2064,10 +2064,9 @@ void Host::ConfirmMessageAsync(std::string_view title, std::string_view message,
|
|||||||
{
|
{
|
||||||
GPUThread::RunOnThread([title = std::string(title), message = std::string(message), callback = std::move(callback),
|
GPUThread::RunOnThread([title = std::string(title), message = std::string(message), callback = std::move(callback),
|
||||||
yes_text = std::string(yes_text), no_text = std::string(no_text), needs_pause]() mutable {
|
yes_text = std::string(yes_text), no_text = std::string(no_text), needs_pause]() mutable {
|
||||||
if (!FullscreenUI::Initialize())
|
// Need to reset run idle state _again_ after displaying.
|
||||||
{
|
auto final_callback = [callback = std::move(callback), needs_pause](bool result) {
|
||||||
callback(false);
|
FullscreenUI::UpdateRunIdleState();
|
||||||
|
|
||||||
if (needs_pause)
|
if (needs_pause)
|
||||||
{
|
{
|
||||||
Host::RunOnCPUThread([]() {
|
Host::RunOnCPUThread([]() {
|
||||||
@ -2075,16 +2074,15 @@ void Host::ConfirmMessageAsync(std::string_view title, std::string_view message,
|
|||||||
System::PauseSystem(false);
|
System::PauseSystem(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Need to reset run idle state _again_ after displaying.
|
|
||||||
auto final_callback = [callback = std::move(callback)](bool result) {
|
|
||||||
FullscreenUI::UpdateRunIdleState();
|
|
||||||
callback(result);
|
callback(result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!FullscreenUI::Initialize())
|
||||||
|
{
|
||||||
|
final_callback(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ImGuiFullscreen::OpenConfirmMessageDialog(std::move(title), std::move(message), std::move(final_callback),
|
ImGuiFullscreen::OpenConfirmMessageDialog(std::move(title), std::move(message), std::move(final_callback),
|
||||||
fmt::format(ICON_FA_CHECK " {}", yes_text),
|
fmt::format(ICON_FA_CHECK " {}", yes_text),
|
||||||
fmt::format(ICON_FA_TIMES " {}", no_text));
|
fmt::format(ICON_FA_TIMES " {}", no_text));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user