diff --git a/aegisub/libaegisub/include/libaegisub/background_runner.h b/aegisub/libaegisub/include/libaegisub/background_runner.h index 09f374f55..7ae72e886 100644 --- a/aegisub/libaegisub/include/libaegisub/background_runner.h +++ b/aegisub/libaegisub/include/libaegisub/background_runner.h @@ -21,7 +21,9 @@ #pragma once #ifndef LAGI_PRE +#include #include + #ifdef _WIN32 #include #else @@ -49,7 +51,7 @@ namespace agi { /// Set an additional message associated with the task virtual void SetMessage(std::string const& msg)=0; /// Set the current task progress - virtual void SetProgress(int cur, int max)=0; + virtual void SetProgress(int64_t cur, int64_t max)=0; /// @brief Log a message /// diff --git a/aegisub/src/auto4_base.h b/aegisub/src/auto4_base.h index fb74a035c..6fa3a3d65 100644 --- a/aegisub/src/auto4_base.h +++ b/aegisub/src/auto4_base.h @@ -148,7 +148,7 @@ namespace Automation4 { void SetIndeterminate() { impl->SetIndeterminate(); } void SetTitle(std::string const& title) { impl->SetTitle(title); } void SetMessage(std::string const& msg) { impl->SetMessage(msg); } - void SetProgress(int cur, int max) { impl->SetProgress(cur, max); } + void SetProgress(int64_t cur, int64_t max) { impl->SetProgress(cur, max); } void Log(std::string const& str) { impl->Log(str); } bool IsCancelled() { return impl->IsCancelled(); } diff --git a/aegisub/src/dialog_progress.cpp b/aegisub/src/dialog_progress.cpp index 5ffc49b10..649e92c36 100644 --- a/aegisub/src/dialog_progress.cpp +++ b/aegisub/src/dialog_progress.cpp @@ -70,7 +70,7 @@ public: SafeQueue(EVT_MESSAGE, lagi_wxString(msg)); } - void SetProgress(int cur, int max) { + void SetProgress(int64_t cur, int64_t max) { SafeQueue(EVT_PROGRESS, int(double(cur) / max * 100)); }