multi thread game dumps and file uploads.

previous uploads were all single threaded, which meant that it only uploaded as fast as the slowest source.
usb transfer is still single threaded due it being random access for both files and data, making it
hard for the read thread to run freely.
This commit is contained in:
ITotalJustice
2025-05-20 22:50:05 +01:00
parent f956adabc3
commit ef25c3edc7
9 changed files with 555 additions and 146 deletions

View File

@@ -37,6 +37,10 @@ struct ProgressBox final : Widget {
auto CopyFile(const fs::FsPath& src, const fs::FsPath& dst) -> Result;
void Yield();
auto GetCpuId() const {
return m_cpuid;
}
auto OnDownloadProgressCallback() {
return [this](s64 dltotal, s64 dlnow, s64 ultotal, s64 ulnow){
if (this->ShouldExit()) {
@@ -81,6 +85,7 @@ private:
std::vector<u8> m_image_data{};
// shared data end.
int m_cpuid{};
int m_image{};
bool m_own_image{};
};