mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
overlays: update progress dialog workaround
This commit is contained in:
parent
27349c5c69
commit
c78c504043
4 changed files with 11 additions and 16 deletions
|
@ -1535,7 +1535,7 @@ void ppu_thread::cpu_task()
|
||||||
// Wait until the progress dialog is closed.
|
// Wait until the progress dialog is closed.
|
||||||
// We don't want to open a cell dialog while a native progress dialog is still open.
|
// We don't want to open a cell dialog while a native progress dialog is still open.
|
||||||
thread_ctrl::wait_on<atomic_wait::op_ne>(g_progr_ptotal, 0);
|
thread_ctrl::wait_on<atomic_wait::op_ne>(g_progr_ptotal, 0);
|
||||||
g_fxo->get<progress_dialog_workaround>().skip_the_progress_dialog = true;
|
g_fxo->get<progress_dialog_server>().show_overlay_message_only = true;
|
||||||
|
|
||||||
// Sadly we can't postpone initializing guest time because we need to run PPU threads
|
// Sadly we can't postpone initializing guest time because we need to run PPU threads
|
||||||
// (the farther it's postponed, the less accuracy of guest time has been lost)
|
// (the farther it's postponed, the less accuracy of guest time has been lost)
|
||||||
|
|
|
@ -15,14 +15,6 @@
|
||||||
|
|
||||||
void init_fxo_for_exec(utils::serial*, bool);
|
void init_fxo_for_exec(utils::serial*, bool);
|
||||||
|
|
||||||
struct progress_dialog_workaround
|
|
||||||
{
|
|
||||||
// WORKAROUND:
|
|
||||||
// We don't want to show the native dialog during gameplay.
|
|
||||||
// This can currently interfere with cell dialogs.
|
|
||||||
atomic_t<bool> skip_the_progress_dialog = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class localized_string_id;
|
enum class localized_string_id;
|
||||||
enum class video_renderer;
|
enum class video_renderer;
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ void progress_dialog_server::operator()()
|
||||||
g_system_progress_canceled = false;
|
g_system_progress_canceled = false;
|
||||||
|
|
||||||
// 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.
|
bool show_overlay_message = false; // Only show an overlay message after initial loading is done.
|
||||||
std::shared_ptr<MsgDialogBase> dlg;
|
std::shared_ptr<MsgDialogBase> dlg;
|
||||||
|
|
||||||
if (const auto renderer = rsx::get_current_renderer())
|
if (const auto renderer = rsx::get_current_renderer())
|
||||||
|
@ -71,9 +71,9 @@ void progress_dialog_server::operator()()
|
||||||
renderer->is_initialized.wait(false, atomic_wait_timeout(5 * 1000000000ull));
|
renderer->is_initialized.wait(false, atomic_wait_timeout(5 * 1000000000ull));
|
||||||
|
|
||||||
auto manager = g_fxo->try_get<rsx::overlays::display_manager>();
|
auto manager = g_fxo->try_get<rsx::overlays::display_manager>();
|
||||||
skip_this_one = !renderer->is_initialized || g_fxo->get<progress_dialog_workaround>().skip_the_progress_dialog || (manager && manager->get<rsx::overlays::message_dialog>());
|
show_overlay_message = show_overlay_message_only;
|
||||||
|
|
||||||
if (manager && !skip_this_one)
|
if (manager && !show_overlay_message)
|
||||||
{
|
{
|
||||||
MsgDialogType type{};
|
MsgDialogType type{};
|
||||||
type.se_mute_on = true;
|
type.se_mute_on = true;
|
||||||
|
@ -88,7 +88,7 @@ void progress_dialog_server::operator()()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skip_this_one && !native_dlg && (dlg = Emu.GetCallbacks().get_msg_dialog()))
|
if (!show_overlay_message && !native_dlg && (dlg = Emu.GetCallbacks().get_msg_dialog()))
|
||||||
{
|
{
|
||||||
dlg->type.se_normal = true;
|
dlg->type.se_normal = true;
|
||||||
dlg->type.bg_invisible = true;
|
dlg->type.bg_invisible = true;
|
||||||
|
@ -141,7 +141,7 @@ void progress_dialog_server::operator()()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skip_this_one)
|
if (show_overlay_message)
|
||||||
{
|
{
|
||||||
// Show a message instead
|
// Show a message instead
|
||||||
rsx::overlays::show_ppu_compile_notification();
|
rsx::overlays::show_ppu_compile_notification();
|
||||||
|
@ -180,7 +180,7 @@ void progress_dialog_server::operator()()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skip_this_one)
|
if (show_overlay_message)
|
||||||
{
|
{
|
||||||
// Make sure to update any pending messages. PPU compilation may freeze the image.
|
// Make sure to update any pending messages. PPU compilation may freeze the image.
|
||||||
rsx::overlays::refresh_message_queue();
|
rsx::overlays::refresh_message_queue();
|
||||||
|
@ -194,7 +194,7 @@ void progress_dialog_server::operator()()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skip_this_one)
|
if (show_overlay_message)
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,7 @@ struct progress_dialog_server
|
||||||
~progress_dialog_server();
|
~progress_dialog_server();
|
||||||
|
|
||||||
static constexpr auto thread_name = "Progress Dialog Server"sv;
|
static constexpr auto thread_name = "Progress Dialog Server"sv;
|
||||||
|
|
||||||
|
// We don't want to show the native dialog during gameplay.
|
||||||
|
atomic_t<bool> show_overlay_message_only = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue