mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-22 03:40:30 +00:00
hotfix: skip progr dialogs if msg dialogs are open
This commit is contained in:
parent
e57f36fc5b
commit
b7eefeac8b
@ -311,7 +311,7 @@ namespace rsx
|
|||||||
text_display.translate(0, -(text_h - 16));
|
text_display.translate(0, -(text_h - 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 message_dialog::progress_bar_count()
|
u32 message_dialog::progress_bar_count() const
|
||||||
{
|
{
|
||||||
return num_progress_bars;
|
return num_progress_bars;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace rsx
|
|||||||
|
|
||||||
void set_text(const std::string& text);
|
void set_text(const std::string& text);
|
||||||
|
|
||||||
u32 progress_bar_count();
|
u32 progress_bar_count() const;
|
||||||
void progress_bar_set_taskbar_index(s32 index);
|
void progress_bar_set_taskbar_index(s32 index);
|
||||||
error_code progress_bar_set_message(u32 index, const std::string& msg);
|
error_code progress_bar_set_message(u32 index, const std::string& msg);
|
||||||
error_code progress_bar_increment(u32 index, f32 value);
|
error_code progress_bar_increment(u32 index, f32 value);
|
||||||
|
@ -361,13 +361,17 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize message dialog
|
// Initialize message dialog
|
||||||
|
bool skip_this_one = false; // Workaround: do not open a progress dialog if there is already a cell message dialog open.
|
||||||
std::shared_ptr<MsgDialogBase> dlg;
|
std::shared_ptr<MsgDialogBase> dlg;
|
||||||
std::shared_ptr<rsx::overlays::message_dialog> native_dlg;
|
std::shared_ptr<rsx::overlays::message_dialog> native_dlg;
|
||||||
|
|
||||||
if (const auto renderer = rsx::get_current_renderer();
|
if (const auto renderer = rsx::get_current_renderer();
|
||||||
renderer && renderer->is_inited)
|
renderer && renderer->is_inited)
|
||||||
{
|
{
|
||||||
if (auto manager = g_fxo->try_get<rsx::overlays::display_manager>())
|
auto manager = g_fxo->try_get<rsx::overlays::display_manager>();
|
||||||
|
skip_this_one = manager && manager->get<rsx::overlays::message_dialog>();
|
||||||
|
|
||||||
|
if (manager && !skip_this_one)
|
||||||
{
|
{
|
||||||
MsgDialogType type{};
|
MsgDialogType type{};
|
||||||
type.se_normal = true;
|
type.se_normal = true;
|
||||||
@ -381,7 +385,7 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!native_dlg)
|
if (!skip_this_one && !native_dlg)
|
||||||
{
|
{
|
||||||
dlg = Emu.GetCallbacks().get_msg_dialog();
|
dlg = Emu.GetCallbacks().get_msg_dialog();
|
||||||
dlg->type.se_normal = true;
|
dlg->type.se_normal = true;
|
||||||
@ -411,6 +415,13 @@ namespace
|
|||||||
// Update progress
|
// Update progress
|
||||||
while (thread_ctrl::state() != thread_state::aborting)
|
while (thread_ctrl::state() != thread_state::aborting)
|
||||||
{
|
{
|
||||||
|
if (skip_this_one)
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
std::this_thread::sleep_for(10ms);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const u32 ftotal_new = g_progr_ftotal;
|
const u32 ftotal_new = g_progr_ftotal;
|
||||||
const u32 fdone_new = g_progr_fdone;
|
const u32 fdone_new = g_progr_fdone;
|
||||||
const u32 ptotal_new = g_progr_ptotal;
|
const u32 ptotal_new = g_progr_ptotal;
|
||||||
@ -476,6 +487,12 @@ namespace
|
|||||||
g_progr_ptotal -= ptotal;
|
g_progr_ptotal -= ptotal;
|
||||||
g_progr_pdone -= pdone;
|
g_progr_pdone -= pdone;
|
||||||
|
|
||||||
|
if (skip_this_one)
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Emu.CallAfter([=]()
|
Emu.CallAfter([=]()
|
||||||
{
|
{
|
||||||
if (native_dlg)
|
if (native_dlg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user