mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Emulation: Fix boot path resolving
* Fix /dev_flash executables path arg. (/host_root is wrong for it) * Fix usage of /host_root for homebrew applications when it is not mounted, use /app_home. * Fix path source detection. (don't get fooled by path slashes repetitions, symlinks, '.', ".." and ('\' on Windows)) * Unescape tail of /dev_hdd0 paths.
This commit is contained in:
parent
95725bf7fc
commit
49c5ce30cc
7 changed files with 70 additions and 124 deletions
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include <clocale>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
// For now, a trivial constructor/destructor. May add command line usage later.
|
||||
headless_application::headless_application(int& argc, char** argv) : QCoreApplication(argc, argv)
|
||||
{
|
||||
|
@ -107,6 +109,11 @@ void headless_application::InitializeCallbacks()
|
|||
callbacks.get_localized_string = [](localized_string_id, const char*) -> std::string { return {}; };
|
||||
callbacks.get_localized_u32string = [](localized_string_id, const char*) -> std::u32string { return {}; };
|
||||
|
||||
callbacks.resolve_path = [](std::string_view sv)
|
||||
{
|
||||
return QFileInfo(QString::fromUtf8(sv.data(), static_cast<int>(sv.size()))).canonicalFilePath().toStdString();
|
||||
};
|
||||
|
||||
Emu.SetCallbacks(std::move(callbacks));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue