Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix firmware updating/reinstallation #9745

Merged
merged 2 commits into from Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions rpcs3/Loader/TAR.cpp
Expand Up @@ -116,16 +116,6 @@ bool tar_object::extract(std::string path, std::string ignore)
{
auto data = get_file(header.name).release();

if (fs::file prev{result})
{
if (prev.to_vector<u8>() == static_cast<fs::container_stream<std::vector<u8>>*>(data.get())->obj)
{
// Workaround: avoid overwriting existing data if it's the same.
tar_log.notice("TAR Loader: skipped existing file %s", header.name);
break;
}
}

fs::file file(result, fs::rewrite);

if (file)
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/rpcs3qt/gui_application.cpp
Expand Up @@ -464,6 +464,9 @@ void gui_application::OnChangeStyleSheetRequest()
return;
}

// Remove old fonts
QFontDatabase::removeAllApplicationFonts();

const QString stylesheet_name = m_gui_settings->GetValue(gui::m_currentStylesheet).toString();

if (stylesheet_name.isEmpty() || stylesheet_name == gui::DefaultStylesheet)
Expand Down Expand Up @@ -506,9 +509,6 @@ void gui_application::OnChangeStyleSheetRequest()
{
const QString config_dir = qstr(fs::get_config_dir());

// Remove old fonts
QFontDatabase::removeAllApplicationFonts();

// Add PS3 fonts
QDirIterator ps3_font_it(qstr(g_cfg.vfs.get_dev_flash() + "data/font/"), QStringList() << "*.ttf", QDir::Files, QDirIterator::Subdirectories);
while (ps3_font_it.hasNext())
Expand Down
7 changes: 7 additions & 0 deletions rpcs3/rpcs3qt/main_window.cpp
Expand Up @@ -35,6 +35,7 @@
#include <QMimeData>
#include <QMessageBox>
#include <QFileDialog>
#include <QFontDatabase>

#include "rpcs3_version.h"
#include "Emu/System.h"
Expand Down Expand Up @@ -855,6 +856,9 @@ void main_window::HandlePupInstallation(QString file_path)
return;
}

// Remove possibly PS3 fonts from database
QFontDatabase::removeAllApplicationFonts();

progress_dialog pdlg(tr("RPCS3 Firmware Installer"), tr("Installing firmware version %1\nPlease wait...").arg(qstr(version_string)), tr("Cancel"), 0, static_cast<int>(update_filenames.size()), false, this);
pdlg.show();

Expand Down Expand Up @@ -919,6 +923,9 @@ void main_window::HandlePupInstallation(QString file_path)
}
}

// Update with newly installed PS3 fonts
Q_EMIT RequestGlobalStylesheetChange();

if (progress > 0)
{
gui_log.success("Successfully installed PS3 firmware version %s.", version_string);
Expand Down