mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
Emu: some cleanup
This commit is contained in:
parent
a3e8a61547
commit
03b76b4606
149 changed files with 957 additions and 1139 deletions
|
@ -23,10 +23,8 @@
|
|||
#include <CpuArch.h>
|
||||
#include <7z.h>
|
||||
#include <7zAlloc.h>
|
||||
#include <7zBuf.h>
|
||||
#include <7zCrc.h>
|
||||
#include <7zFile.h>
|
||||
#include <7zVersion.h>
|
||||
|
||||
#define PATH_MAX MAX_PATH
|
||||
|
||||
|
@ -37,10 +35,6 @@
|
|||
|
||||
LOG_CHANNEL(update_log, "UPDATER");
|
||||
|
||||
update_manager::update_manager()
|
||||
{
|
||||
}
|
||||
|
||||
void update_manager::check_for_updates(bool automatic, bool check_only, QWidget* parent)
|
||||
{
|
||||
m_update_message.clear();
|
||||
|
@ -174,7 +168,7 @@ bool update_manager::handle_json(bool automatic, bool check_only, const QByteArr
|
|||
|
||||
update_log.notice("Current: %s, latest: %s, difference: %lld ms", cur_str.toStdString(), lts_str.toStdString(), diff_msec);
|
||||
|
||||
Localized localized;
|
||||
const Localized localized;
|
||||
|
||||
if (hash_found)
|
||||
{
|
||||
|
@ -274,7 +268,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data)
|
|||
{
|
||||
m_downloader->update_progress_dialog(tr("Updating RPCS3"));
|
||||
|
||||
if (m_expected_size != data.size() + 0u)
|
||||
if (m_expected_size != static_cast<u64>(data.size()))
|
||||
{
|
||||
update_log.error("Download size mismatch: %d expected: %d", data.size(), m_expected_size);
|
||||
return false;
|
||||
|
@ -311,7 +305,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data)
|
|||
update_log.error("Failed to create temporary file: %s", tmpfile_path);
|
||||
return false;
|
||||
}
|
||||
if (tmpfile.write(data.data(), data.size()) != data.size())
|
||||
if (tmpfile.write(data.data(), data.size()) != static_cast<u64>(data.size()))
|
||||
{
|
||||
update_log.error("Failed to write temporary file: %s", tmpfile_path);
|
||||
return false;
|
||||
|
@ -347,14 +341,14 @@ bool update_manager::handle_rpcs3(const QByteArray& data)
|
|||
|
||||
res = SZ_OK;
|
||||
{
|
||||
lookStream.buf = (Byte*)ISzAlloc_Alloc(&allocImp, kInputBufSize);
|
||||
lookStream.buf = static_cast<Byte*>(ISzAlloc_Alloc(&allocImp, kInputBufSize));
|
||||
if (!lookStream.buf)
|
||||
res = SZ_ERROR_MEM;
|
||||
else
|
||||
{
|
||||
lookStream.bufSize = kInputBufSize;
|
||||
lookStream.realStream = &archiveStream.vt;
|
||||
LookToRead2_Init(&lookStream);
|
||||
LookToRead2_Init(&lookStream)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -429,9 +423,7 @@ bool update_manager::handle_rpcs3(const QByteArray& data)
|
|||
temp_u8[index] = static_cast<u8>(temp_u16[index]);
|
||||
}
|
||||
temp_u8[len] = 0;
|
||||
std::string name((char*)temp_u8);
|
||||
|
||||
name = Emulator::GetEmuDir() + name;
|
||||
const std::string name = Emulator::GetEmuDir() + std::string(reinterpret_cast<char*>(temp_u8));
|
||||
|
||||
if (!isDir)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue