From edc9e9b4ec37613e970d2d9e727ebcc2a71a4a9a Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 4 Jun 2018 20:17:05 +0200 Subject: [PATCH] Qt/RSX: add window title to the shader compilation msg_dialog --- rpcs3/Emu/Cell/Modules/cellMsgDialog.h | 2 +- rpcs3/Emu/RSX/rsx_cache.h | 2 +- rpcs3/rpcs3qt/msg_dialog_frame.cpp | 4 ++-- rpcs3/rpcs3qt/msg_dialog_frame.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellMsgDialog.h b/rpcs3/Emu/Cell/Modules/cellMsgDialog.h index 844f18da50..44ec5884ae 100644 --- a/rpcs3/Emu/Cell/Modules/cellMsgDialog.h +++ b/rpcs3/Emu/Cell/Modules/cellMsgDialog.h @@ -82,7 +82,7 @@ public: std::function on_osk_input_entered; virtual ~MsgDialogBase(); - virtual void Create(const std::string& msg) = 0; + virtual void Create(const std::string& msg, const std::string& title = "") = 0; virtual void CreateOsk(const std::string& msg, char16_t* osk_text, u32 charlimit) = 0; virtual void SetMsg(const std::string& msg) = 0; virtual void ProgressBarSetMsg(u32 progressBarIndex, const std::string& msg) = 0; diff --git a/rpcs3/Emu/RSX/rsx_cache.h b/rpcs3/Emu/RSX/rsx_cache.h index 86a21f34e0..6c73947ebd 100644 --- a/rpcs3/Emu/RSX/rsx_cache.h +++ b/rpcs3/Emu/RSX/rsx_cache.h @@ -423,7 +423,7 @@ namespace rsx Emu.CallAfter([&]() { - dlg->Create("Preloading cached shaders from disk.\nPlease wait..."); + dlg->Create("Preloading cached shaders from disk.\nPlease wait...", "Shader Compilation"); initialized.store(true); }); diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.cpp b/rpcs3/rpcs3qt/msg_dialog_frame.cpp index 932566d998..ed60e57883 100644 --- a/rpcs3/rpcs3qt/msg_dialog_frame.cpp +++ b/rpcs3/rpcs3qt/msg_dialog_frame.cpp @@ -7,7 +7,7 @@ constexpr auto qstr = QString::fromStdString; -void msg_dialog_frame::Create(const std::string& msg) +void msg_dialog_frame::Create(const std::string& msg, const std::string& title) { static const auto& barWidth = [](){return QLabel("This is the very length of the progressbar due to hidpi reasons.").sizeHint().width();}; @@ -18,7 +18,7 @@ void msg_dialog_frame::Create(const std::string& msg) } m_dialog = new custom_dialog(type.disable_cancel); - m_dialog->setWindowTitle(type.se_normal ? "Normal dialog" : "Error dialog"); + m_dialog->setWindowTitle(title.empty() ? (type.se_normal ? "Normal dialog" : "Error dialog") : qstr(title)); m_dialog->setWindowOpacity(type.bg_invisible ? 1. : 0.75); m_text = new QLabel(qstr(msg)); diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.h b/rpcs3/rpcs3qt/msg_dialog_frame.h index d52df97d83..7840ce978e 100644 --- a/rpcs3/rpcs3qt/msg_dialog_frame.h +++ b/rpcs3/rpcs3qt/msg_dialog_frame.h @@ -61,7 +61,7 @@ class msg_dialog_frame : public QObject, public MsgDialogBase public: msg_dialog_frame(QWindow* taskbarTarget); ~msg_dialog_frame(); - virtual void Create(const std::string& msg) override; + virtual void Create(const std::string& msg, const std::string& title = "") override; virtual void CreateOsk(const std::string& msg, char16_t* osk_text, u32 charlimit) override; virtual void SetMsg(const std::string& msg) override; virtual void ProgressBarSetMsg(u32 progressBarIndex, const std::string& msg) override;