mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 01:27:00 +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
|
||||
const std::string exe_dir = rpcs3::utils::get_exe_dir();
|
||||
const std::string orig_path = exe_dir + "rpcs3.exe";
|
||||
|
||||
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);
|
||||
const std::wstring wchar_orig_path = utf8_to_wchar(orig_path);
|
||||
|
||||
char temp_path[PATH_MAX];
|
||||
|
||||
@ -417,7 +413,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
||||
ISzAlloc allocImp;
|
||||
ISzAlloc allocTempImp;
|
||||
|
||||
CFileInStream archiveStream;
|
||||
CFileInStream archiveStream{};
|
||||
CLookToRead2 lookStream;
|
||||
CSzArEx db;
|
||||
SRes res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user