mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
update_manager: Simplify wchar conversion
This commit is contained in:
parent
05086cda3b
commit
e3cd31f057
@ -385,11 +385,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
// Get executable path
|
// Get executable path
|
||||||
const std::string exe_dir = rpcs3::utils::get_exe_dir();
|
const std::string exe_dir = rpcs3::utils::get_exe_dir();
|
||||||
const std::string orig_path = exe_dir + "rpcs3.exe";
|
const std::string orig_path = exe_dir + "rpcs3.exe";
|
||||||
|
const std::wstring wchar_orig_path = utf8_to_wchar(orig_path);
|
||||||
std::wstring wchar_orig_path;
|
|
||||||
const auto tmp_size = MultiByteToWideChar(CP_UTF8, 0, orig_path.c_str(), -1, nullptr, 0);
|
|
||||||
wchar_orig_path.resize(tmp_size);
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, orig_path.c_str(), -1, wchar_orig_path.data(), tmp_size);
|
|
||||||
|
|
||||||
char temp_path[PATH_MAX];
|
char temp_path[PATH_MAX];
|
||||||
|
|
||||||
@ -417,7 +413,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
ISzAlloc allocImp;
|
ISzAlloc allocImp;
|
||||||
ISzAlloc allocTempImp;
|
ISzAlloc allocTempImp;
|
||||||
|
|
||||||
CFileInStream archiveStream;
|
CFileInStream archiveStream{};
|
||||||
CLookToRead2 lookStream;
|
CLookToRead2 lookStream;
|
||||||
CSzArEx db;
|
CSzArEx db;
|
||||||
SRes res;
|
SRes res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user