diff --git a/Source/Core/Core/HW/WiiSaveCrypted.cpp b/Source/Core/Core/HW/WiiSaveCrypted.cpp index d1f4d69a72..449b82e421 100644 --- a/Source/Core/Core/HW/WiiSaveCrypted.cpp +++ b/Source/Core/Core/HW/WiiSaveCrypted.cpp @@ -39,7 +39,7 @@ const u8 CWiiSaveCrypted::s_md5_blanker[16] = { }; const u32 CWiiSaveCrypted::s_ng_id = 0x0403AC68; -bool CWiiSaveCrypted::ImportWiiSave(const char* filename) +bool CWiiSaveCrypted::ImportWiiSave(const std::string& filename) { CWiiSaveCrypted save_file(filename); return save_file.m_valid; @@ -102,11 +102,10 @@ void CWiiSaveCrypted::ExportAllSaves() (File::GetUserPath(D_USER_IDX) + "private/wii/title/").c_str()); } -CWiiSaveCrypted::CWiiSaveCrypted(const char* filename, u64 title_id) - : m_title_id(title_id) +CWiiSaveCrypted::CWiiSaveCrypted(const std::string& filename, u64 title_id) + : m_encrypted_save_path(filename), m_title_id(title_id) { Common::ReadReplacements(replacements); - m_encrypted_save_path = std::string(filename); memcpy(m_sd_iv, "\x21\x67\x12\xE6\xAA\x1F\x68\x9F\x95\xC5\xA2\x23\x24\xDC\x6A\x98", 0x10); if (!title_id) // Import @@ -612,7 +611,7 @@ bool CWiiSaveCrypted::getPaths(bool for_export) return true; } -void CWiiSaveCrypted::ScanForFiles(std::string save_directory, std::vector& file_list, +void CWiiSaveCrypted::ScanForFiles(const std::string& save_directory, std::vector& file_list, u32 *num_files, u32 *size_files) { std::vector directories; @@ -632,13 +631,13 @@ void CWiiSaveCrypted::ScanForFiles(std::string save_directory, std::vector& file_list, + void ScanForFiles(const std::string& save_directory, std::vector& file_list, u32 *num_files, u32 *size_files); static const u8 s_sd_key[16]; diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 0d62bd5b53..33d852d044 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1403,7 +1403,7 @@ void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event)) if (!path.IsEmpty()) { - CWiiSaveCrypted::ImportWiiSave(WxStrToStr(path).c_str()); + CWiiSaveCrypted::ImportWiiSave(WxStrToStr(path)); } }