DolphinWX: Add a progress dialog host command

Allows feedback from backends to be communicated to the user when
long-running operation are performed (e.g. shader compilation).
This commit is contained in:
Stenzek
2017-06-26 01:35:24 +10:00
parent 334e117da7
commit 1fccbd5be3
9 changed files with 59 additions and 0 deletions

View File

@ -488,3 +488,12 @@ void Host_YieldToUI()
{
wxGetApp().GetMainLoop()->YieldFor(wxEVT_CATEGORY_UI);
}
void Host_UpdateProgressDialog(const char* caption, int position, int total)
{
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATE_PROGRESS_DIALOG);
event.SetString(caption);
event.SetInt(position);
event.SetExtraLong(total);
main_frame->GetEventHandler()->AddPendingEvent(event);
}