overlays: fix taskbar progress reset

This commit is contained in:
Megamouse 2021-04-03 22:19:47 +02:00 committed by Nekotekina
parent ed8f60431f
commit bf1756448e
4 changed files with 12 additions and 7 deletions

View File

@ -182,6 +182,16 @@ namespace rsx
close(true, true);
}
void message_dialog::close(bool use_callback, bool stop_pad_interception)
{
if (num_progress_bars > 0)
{
Emu.GetCallbacks().handle_taskbar_progress(0, 1);
}
user_interface::close(use_callback, stop_pad_interception);
}
struct msg_dialog_thread
{
static constexpr auto thread_name = "MsgDialog Thread"sv;

View File

@ -32,6 +32,7 @@ namespace rsx
compiled_resource get_compiled() override;
void on_button_pressed(pad_button button_press) override;
void close(bool use_callback, bool stop_pad_interception) override;
error_code show(bool is_blocking, const std::string& text, const MsgDialogType& type, std::function<void(s32 status)> on_close);

View File

@ -218,12 +218,6 @@ namespace rsx
// NOTE: Object removal should be the last step
if (auto& manager = g_fxo->get<display_manager>(); g_fxo->is_init<display_manager>())
{
if (auto dlg = manager.get<rsx::overlays::message_dialog>())
{
if (dlg->progress_bar_count())
Emu.GetCallbacks().handle_taskbar_progress(0, 1);
}
manager.remove(uid);
}
}

View File

@ -89,7 +89,7 @@ namespace rsx
virtual void on_button_pressed(pad_button /*button_press*/) {}
void close(bool use_callback, bool stop_pad_interception);
virtual void close(bool use_callback, bool stop_pad_interception);
s32 run_input_loop();
};