GCMemcardManager: Rewrite file importing logic to provide a better user experience.

This commit is contained in:
Admiral H. Curtiss
2020-07-31 20:56:52 +02:00
parent 3286d2df3d
commit 08dccb8727
4 changed files with 134 additions and 13 deletions

View File

@ -17,6 +17,8 @@ namespace Memcard
{
class GCMemcard;
class GCMemcardErrorCode;
struct Savefile;
enum class ReadSavefileErrorCode;
enum class SavefileFormat;
} // namespace Memcard
@ -41,6 +43,7 @@ public:
~GCMemcardManager();
static QString GetErrorMessagesForErrorCode(const Memcard::GCMemcardErrorCode& code);
static QString GetErrorMessageForErrorCode(Memcard::ReadSavefileErrorCode code);
private:
struct IconAnimationData;
@ -57,6 +60,8 @@ private:
std::vector<u8> GetSelectedFileIndices();
void ImportFiles(int slot, const std::vector<Memcard::Savefile>& savefiles);
void CopyFiles();
void ImportFile();
void DeleteFiles();