mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Use the patched naett functions to implement progress updates
This commit is contained in:
1 parent
c17a559188
commit
9535b16740
8 files changed
+52
-39
No files matched your search
@@ -22,6 +22,18 @@
|
||||
|
||||
namespace net {
|
||||
|
||||
void RequestProgress::Update(int64_t downloaded, int64_t totalBytes, bool done) {
|
||||
if (totalBytes) {
|
||||
progress = (double)downloaded / (double)totalBytes;
|
||||
} else {
|
||||
progress = 0.01f;
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback(downloaded, totalBytes, done);
|
||||
}
|
||||
}
|
||||
|
||||
bool Buffer::FlushSocket(uintptr_t sock, double timeout, bool *cancelled) {
|
||||
static constexpr float CANCEL_INTERVAL = 0.25f;
|
||||
for (size_t pos = 0, end = data_.size(); pos < end; ) {
|
||||
|
||||
Reference in new issue
Block a user