Use int64_t for progress reporting rather than int as it's what ffms2 requires. Fixes magic jumping progress bars during indexing.
Originally committed to SVN as r6556.
This commit is contained in:
parent
8ec478db36
commit
7f8aecd7fa
3 changed files with 5 additions and 3 deletions
|
@ -21,7 +21,9 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef LAGI_PRE
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <functional>
|
||||
#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
|
||||
///
|
||||
|
|
|
@ -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(); }
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue