mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-16 07:20:59 +00:00
Fix firmware installation for vfs
This commit is contained in:
parent
9138d537c8
commit
6141bc5598
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Utilities/types.h"
|
#include "Utilities/types.h"
|
||||||
#include "Utilities/geometry.h"
|
#include "Utilities/geometry.h"
|
||||||
|
#include "Emu/System.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -137,7 +138,7 @@ namespace rsx
|
|||||||
fallback_fonts.push_back("/usr/share/fonts/TTF/DejaVuSans.ttf"); //arch
|
fallback_fonts.push_back("/usr/share/fonts/TTF/DejaVuSans.ttf"); //arch
|
||||||
#endif
|
#endif
|
||||||
//Also attempt to load from dev_flash as a last resort
|
//Also attempt to load from dev_flash as a last resort
|
||||||
fallback_fonts.push_back(fs::get_config_dir() + "dev_flash/data/font/SCE-PS3-VR-R-LATIN.TTF");
|
fallback_fonts.push_back(Emu.GetEmuDir() + "dev_flash/data/font/SCE-PS3-VR-R-LATIN.TTF");
|
||||||
|
|
||||||
std::string requested_file = font_dir + ttf_name + ".ttf";
|
std::string requested_file = font_dir + ttf_name + ".ttf";
|
||||||
std::string file_path = requested_file;
|
std::string file_path = requested_file;
|
||||||
|
@ -198,8 +198,7 @@ void Emulator::Init()
|
|||||||
g_cfg.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
|
g_cfg.from_string(fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::create).to_string());
|
||||||
|
|
||||||
// Create directories
|
// Create directories
|
||||||
const std::string emu_dir_ = g_cfg.vfs.emulator_dir;
|
const std::string emu_dir = GetEmuDir();
|
||||||
const std::string emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
|
||||||
const std::string dev_hdd0 = fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir);
|
const std::string dev_hdd0 = fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir);
|
||||||
const std::string dev_hdd1 = fmt::replace_all(g_cfg.vfs.dev_hdd1, "$(EmulatorDir)", emu_dir);
|
const std::string dev_hdd1 = fmt::replace_all(g_cfg.vfs.dev_hdd1, "$(EmulatorDir)", emu_dir);
|
||||||
const std::string dev_usb = fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir);
|
const std::string dev_usb = fmt::replace_all(g_cfg.vfs.dev_usb000, "$(EmulatorDir)", emu_dir);
|
||||||
@ -307,20 +306,20 @@ bool Emulator::InstallPkg(const std::string& path)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Emulator::GetHddDir()
|
std::string Emulator::GetEmuDir()
|
||||||
{
|
{
|
||||||
const std::string& emu_dir_ = g_cfg.vfs.emulator_dir;
|
const std::string& emu_dir_ = g_cfg.vfs.emulator_dir;
|
||||||
const std::string& emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
return emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
||||||
|
}
|
||||||
|
|
||||||
return fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir);
|
std::string Emulator::GetHddDir()
|
||||||
|
{
|
||||||
|
return fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", GetEmuDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Emulator::GetLibDir()
|
std::string Emulator::GetLibDir()
|
||||||
{
|
{
|
||||||
const std::string& emu_dir_ = g_cfg.vfs.emulator_dir;
|
return fmt::replace_all(g_cfg.vfs.dev_flash, "$(EmulatorDir)", GetEmuDir()) + "sys/external/";
|
||||||
const std::string& emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
|
||||||
|
|
||||||
return fmt::replace_all(g_cfg.vfs.dev_flash, "$(EmulatorDir)", emu_dir) + "sys/external/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Emulator::SetForceBoot(bool force_boot)
|
void Emulator::SetForceBoot(bool force_boot)
|
||||||
@ -423,8 +422,7 @@ void Emulator::Load(bool add_only)
|
|||||||
fxm::check_unlocked<patch_engine>()->append(m_cache_path + "/patch.yml");
|
fxm::check_unlocked<patch_engine>()->append(m_cache_path + "/patch.yml");
|
||||||
|
|
||||||
// Mount all devices
|
// Mount all devices
|
||||||
const std::string emu_dir_ = g_cfg.vfs.emulator_dir;
|
const std::string emu_dir = GetEmuDir();
|
||||||
const std::string emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
|
||||||
const std::string home_dir = g_cfg.vfs.app_home;
|
const std::string home_dir = g_cfg.vfs.app_home;
|
||||||
std::string bdvd_dir = g_cfg.vfs.dev_bdvd;
|
std::string bdvd_dir = g_cfg.vfs.dev_bdvd;
|
||||||
|
|
||||||
|
@ -243,6 +243,7 @@ public:
|
|||||||
bool BootGame(const std::string& path, bool direct = false, bool add_only = false);
|
bool BootGame(const std::string& path, bool direct = false, bool add_only = false);
|
||||||
bool InstallPkg(const std::string& path);
|
bool InstallPkg(const std::string& path);
|
||||||
|
|
||||||
|
static std::string GetEmuDir();
|
||||||
static std::string GetHddDir();
|
static std::string GetHddDir();
|
||||||
static std::string GetLibDir();
|
static std::string GetLibDir();
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ void main_window::InstallPup(const QString& dropPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tar_object dev_flash_tar(dev_flash_tar_f[2]);
|
tar_object dev_flash_tar(dev_flash_tar_f[2]);
|
||||||
if (!dev_flash_tar.extract(fs::get_config_dir()))
|
if (!dev_flash_tar.extract(Emu.GetEmuDir()))
|
||||||
{
|
{
|
||||||
LOG_ERROR(GENERAL, "Error while installing firmware: TAR contents are invalid.");
|
LOG_ERROR(GENERAL, "Error while installing firmware: TAR contents are invalid.");
|
||||||
QMessageBox::critical(this, tr("Failure!"), tr("Error while installing firmware: TAR contents are invalid."));
|
QMessageBox::critical(this, tr("Failure!"), tr("Error while installing firmware: TAR contents are invalid."));
|
||||||
|
@ -52,9 +52,7 @@ trophy_manager_dialog::trophy_manager_dialog(std::shared_ptr<gui_settings> gui_s
|
|||||||
m_show_platinum_trophies = m_gui_settings->GetValue(gui::tr_show_platinum).toBool();
|
m_show_platinum_trophies = m_gui_settings->GetValue(gui::tr_show_platinum).toBool();
|
||||||
|
|
||||||
// HACK: dev_hdd0 must be mounted for vfs to work for loading trophies.
|
// HACK: dev_hdd0 must be mounted for vfs to work for loading trophies.
|
||||||
const std::string emu_dir_ = g_cfg.vfs.emulator_dir;
|
vfs::mount("dev_hdd0", Emu.GetHddDir());
|
||||||
const std::string emu_dir = emu_dir_.empty() ? fs::get_config_dir() : emu_dir_;
|
|
||||||
vfs::mount("dev_hdd0", fmt::replace_all(g_cfg.vfs.dev_hdd0, "$(EmulatorDir)", emu_dir));
|
|
||||||
|
|
||||||
// Trophy Tree
|
// Trophy Tree
|
||||||
m_trophy_tree = new QTreeWidget();
|
m_trophy_tree = new QTreeWidget();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user