diff options
| author | Anthony <Helios747@users.noreply.github.com> | 2017-07-30 00:42:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-30 00:42:36 -0700 |
| commit | 5bad2ee4a4129e734ff4f4d861cedc4cd573df55 (patch) | |
| tree | cd3c3ccc6e35417858499449d774670c3983cb13 /Source/Core/DolphinWX/Frame.cpp | |
| parent | 5e6d5493165d1214f513b91eaeb4e162d21fdd3e (diff) | |
| parent | 357c55442f3dbdf6f23d16af5362d1a615cb84c1 (diff) | |
Merge pull request #5832 from stenzek/ubershader-prereq
Ubershader prerequisites
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 28e25b4806..08bbcc4a52 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -20,6 +20,7 @@ #include <wx/menu.h> #include <wx/msgdlg.h> #include <wx/panel.h> +#include <wx/progdlg.h> #include <wx/sizer.h> #include <wx/statusbr.h> #include <wx/textctrl.h> @@ -817,6 +818,37 @@ void CFrame::OnHostMessage(wxCommandEvent& event) case IDM_STOPPED: OnStopped(); break; + + case IDM_UPDATE_PROGRESS_DIALOG: + { + int current = event.GetInt(); + int total = static_cast<int>(event.GetExtraLong()); + if (total < 0 || current >= total) + { + if (m_progress_dialog) + { + delete m_progress_dialog; + m_progress_dialog = nullptr; + } + } + else if (total > 0 && current < total) + { + if (!m_progress_dialog) + { + m_progress_dialog = new wxProgressDialog( + _("Operation in progress..."), event.GetString(), total, m_render_frame, + wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH | wxPD_REMAINING_TIME); + m_progress_dialog->Show(); + } + else + { + if (m_progress_dialog->GetRange() != total) + m_progress_dialog->SetRange(total); + m_progress_dialog->Update(current, event.GetString()); + } + } + } + break; } } |
