2024-07-30 11:42:36 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: GPL-3.0+
|
2022-08-28 21:31:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QtCore/QtCore>
|
|
|
|
#include <QtWidgets/QMessageBox>
|
|
|
|
#include <QtWidgets/QProgressDialog>
|
|
|
|
|
|
|
|
#include "QtProgressCallback.h"
|
|
|
|
|
2023-06-11 06:06:40 +00:00
|
|
|
#include "pcsx2/SIO/Memcard/MemoryCardFile.h"
|
|
|
|
#include "pcsx2/SIO/Memcard/MemoryCardFolder.h"
|
2022-08-28 21:31:19 +00:00
|
|
|
|
|
|
|
class MemoryCardConvertWorker : public QtAsyncProgressThread
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MemoryCardConvertWorker(QWidget* parent, MemoryCardType type, MemoryCardFileType fileType, const std::string& srcFileName, const std::string& destFileName);
|
|
|
|
~MemoryCardConvertWorker();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void runAsync() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MemoryCardType type;
|
|
|
|
MemoryCardFileType fileType;
|
|
|
|
std::string srcFileName;
|
|
|
|
std::string destFileName;
|
|
|
|
|
|
|
|
|
|
|
|
bool ConvertToFile(const std::string& srcFolderName, const std::string& destFileName, const MemoryCardFileType type);
|
|
|
|
bool ConvertToFolder(const std::string& srcFolderName, const std::string& destFileName, const MemoryCardFileType type);
|
|
|
|
};
|