mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
Revert "fix: resolve X11 macro conflicts with enum values and Qt constants"
This reverts commit c32ac3b3c1.
This commit is contained in:
@@ -103,7 +103,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
|
|||||||
if (!this->isActiveWindow()) {
|
if (!this->isActiveWindow()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QKeyEvent* event = new QKeyEvent(QEvent::Type::KeyPress, key, Qt::NoModifier);
|
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);
|
||||||
QCoreApplication::postEvent(tree_view, event);
|
QCoreApplication::postEvent(tree_view, event);
|
||||||
SelectUser(tree_view->currentIndex());
|
SelectUser(tree_view->currentIndex());
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObje
|
|||||||
// EventFilter in order to process systemkeys while editing the searchfield
|
// EventFilter in order to process systemkeys while editing the searchfield
|
||||||
bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) {
|
bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) {
|
||||||
// If it isn't a KeyRelease event then continue with standard event processing
|
// If it isn't a KeyRelease event then continue with standard event processing
|
||||||
if (event->type() != QEvent::Type::KeyRelease)
|
if (event->type() != QEvent::KeyRelease)
|
||||||
return QObject::eventFilter(obj, event);
|
return QObject::eventFilter(obj, event);
|
||||||
|
|
||||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||||
@@ -479,7 +479,7 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only send events to visible and properly initialized views
|
// Only send events to visible and properly initialized views
|
||||||
QKeyEvent* event = new QKeyEvent(QEvent::Type::KeyPress, key, Qt::NoModifier);
|
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);
|
||||||
|
|
||||||
if (tree_view->isVisible() && tree_view->model()) {
|
if (tree_view->isVisible() && tree_view->model()) {
|
||||||
QCoreApplication::postEvent(tree_view, event);
|
QCoreApplication::postEvent(tree_view, event);
|
||||||
@@ -487,7 +487,7 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid
|
|||||||
|
|
||||||
if (list_view->isVisible() && list_view->model()) {
|
if (list_view->isVisible() && list_view->model()) {
|
||||||
// Create a new event for the list view to avoid double deletion
|
// Create a new event for the list view to avoid double deletion
|
||||||
QKeyEvent* list_event = new QKeyEvent(QEvent::Type::KeyPress, key, Qt::NoModifier);
|
QKeyEvent* list_event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);
|
||||||
QCoreApplication::postEvent(list_view, list_event);
|
QCoreApplication::postEvent(list_view, list_event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1843,7 +1843,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
|
|||||||
const auto drd_callout = (UISettings::values.callout_flags.GetValue() &
|
const auto drd_callout = (UISettings::values.callout_flags.GetValue() &
|
||||||
static_cast<u32>(CalloutFlag::DRDDeprecation)) == 0;
|
static_cast<u32>(CalloutFlag::DRDDeprecation)) == 0;
|
||||||
|
|
||||||
if (result == Core::SystemResultStatus::SystemSuccess &&
|
if (result == Core::SystemResultStatus::Success &&
|
||||||
system->GetAppLoader().GetFileType() == Loader::FileType::DeconstructedRomDirectory &&
|
system->GetAppLoader().GetFileType() == Loader::FileType::DeconstructedRomDirectory &&
|
||||||
drd_callout) {
|
drd_callout) {
|
||||||
UISettings::values.callout_flags = UISettings::values.callout_flags.GetValue() |
|
UISettings::values.callout_flags = UISettings::values.callout_flags.GetValue() |
|
||||||
@@ -1858,7 +1858,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
|
|||||||
"wiki</a>. This message will not be shown again."));
|
"wiki</a>. This message will not be shown again."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != Core::SystemResultStatus::SystemSuccess) {
|
if (result != Core::SystemResultStatus::Success) {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case Core::SystemResultStatus::ErrorGetLoader:
|
case Core::SystemResultStatus::ErrorGetLoader:
|
||||||
LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString());
|
LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString());
|
||||||
@@ -1943,11 +1943,11 @@ void GMainWindow::ConfigureFilesystemProvider(const std::string& filepath) {
|
|||||||
|
|
||||||
u64 program_id = 0;
|
u64 program_id = 0;
|
||||||
const auto res2 = loader->ReadProgramId(program_id);
|
const auto res2 = loader->ReadProgramId(program_id);
|
||||||
if (res2 == Loader::ResultStatus::LoaderSuccess && file_type == Loader::FileType::NCA) {
|
if (res2 == Loader::ResultStatus::Success && file_type == Loader::FileType::NCA) {
|
||||||
provider->AddEntry(FileSys::TitleType::Application,
|
provider->AddEntry(FileSys::TitleType::Application,
|
||||||
FileSys::GetCRTypeFromNCAType(FileSys::NCA{file}.GetType()), program_id,
|
FileSys::GetCRTypeFromNCAType(FileSys::NCA{file}.GetType()), program_id,
|
||||||
file);
|
file);
|
||||||
} else if (res2 == Loader::ResultStatus::LoaderSuccess &&
|
} else if (res2 == Loader::ResultStatus::Success &&
|
||||||
(file_type == Loader::FileType::XCI || file_type == Loader::FileType::NSP)) {
|
(file_type == Loader::FileType::XCI || file_type == Loader::FileType::NSP)) {
|
||||||
const auto nsp = file_type == Loader::FileType::NSP
|
const auto nsp = file_type == Loader::FileType::NSP
|
||||||
? std::make_shared<FileSys::NSP>(file)
|
? std::make_shared<FileSys::NSP>(file)
|
||||||
@@ -1983,7 +1983,7 @@ void GMainWindow::BootGame(const QString& filename, Service::AM::FrontendAppletP
|
|||||||
const auto v_file = Core::GetGameFileFromPath(vfs, filename.toUtf8().constData());
|
const auto v_file = Core::GetGameFileFromPath(vfs, filename.toUtf8().constData());
|
||||||
const auto loader = Loader::GetLoader(*system, v_file, params.program_id, params.program_index);
|
const auto loader = Loader::GetLoader(*system, v_file, params.program_id, params.program_index);
|
||||||
|
|
||||||
if (loader != nullptr && loader->ReadProgramId(title_id) == Loader::ResultStatus::LoaderSuccess &&
|
if (loader != nullptr && loader->ReadProgramId(title_id) == Loader::ResultStatus::Success &&
|
||||||
type == StartGameType::Normal) {
|
type == StartGameType::Normal) {
|
||||||
// Load per game settings
|
// Load per game settings
|
||||||
const auto file_path =
|
const auto file_path =
|
||||||
@@ -2081,7 +2081,7 @@ void GMainWindow::BootGame(const QString& filename, Service::AM::FrontendAppletP
|
|||||||
title_version = metadata.first->GetVersionString();
|
title_version = metadata.first->GetVersionString();
|
||||||
title_name = metadata.first->GetApplicationName();
|
title_name = metadata.first->GetApplicationName();
|
||||||
}
|
}
|
||||||
if (res != Loader::ResultStatus::LoaderSuccess || title_name.empty()) {
|
if (res != Loader::ResultStatus::Success || title_name.empty()) {
|
||||||
title_name = Common::FS::PathToUTF8String(
|
title_name = Common::FS::PathToUTF8String(
|
||||||
std::filesystem::path{Common::U16StringFromBuffer(filename.utf16(), filename.size())}
|
std::filesystem::path{Common::U16StringFromBuffer(filename.utf16(), filename.size())}
|
||||||
.filename());
|
.filename());
|
||||||
@@ -2853,7 +2853,7 @@ void GMainWindow::OnGameListVerifyIntegrity(const std::string& game_path) {
|
|||||||
const auto result = ContentManager::VerifyGameContents(*system, game_path, QtProgressCallback);
|
const auto result = ContentManager::VerifyGameContents(*system, game_path, QtProgressCallback);
|
||||||
progress.close();
|
progress.close();
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case ContentManager::GameVerificationResult::VerificationSuccess:
|
case ContentManager::GameVerificationResult::Success:
|
||||||
QMessageBox::information(this, tr("Integrity verification succeeded!"),
|
QMessageBox::information(this, tr("Integrity verification succeeded!"),
|
||||||
tr("The operation completed successfully."));
|
tr("The operation completed successfully."));
|
||||||
break;
|
break;
|
||||||
@@ -3094,7 +3094,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
|
|||||||
std::vector<u8> icon_image_file{};
|
std::vector<u8> icon_image_file{};
|
||||||
if (control.second != nullptr) {
|
if (control.second != nullptr) {
|
||||||
icon_image_file = control.second->ReadAllBytes();
|
icon_image_file = control.second->ReadAllBytes();
|
||||||
} else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::LoaderSuccess) {
|
} else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) {
|
||||||
LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path);
|
LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path);
|
||||||
}
|
}
|
||||||
QImage icon_data =
|
QImage icon_data =
|
||||||
@@ -3195,7 +3195,7 @@ void GMainWindow::OnGameListOpenPerGameProperties(const std::string& file) {
|
|||||||
const auto v_file = Core::GetGameFileFromPath(vfs, file);
|
const auto v_file = Core::GetGameFileFromPath(vfs, file);
|
||||||
const auto loader = Loader::GetLoader(*system, v_file);
|
const auto loader = Loader::GetLoader(*system, v_file);
|
||||||
|
|
||||||
if (loader == nullptr || loader->ReadProgramId(title_id) != Loader::ResultStatus::LoaderSuccess) {
|
if (loader == nullptr || loader->ReadProgramId(title_id) != Loader::ResultStatus::Success) {
|
||||||
QMessageBox::information(this, tr("Properties"),
|
QMessageBox::information(this, tr("Properties"),
|
||||||
tr("The game properties could not be loaded."));
|
tr("The game properties could not be loaded."));
|
||||||
return;
|
return;
|
||||||
@@ -3339,7 +3339,7 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case ContentManager::InstallResult::InstallSuccess:
|
case ContentManager::InstallResult::Success:
|
||||||
new_files.append(QFileInfo(file).fileName());
|
new_files.append(QFileInfo(file).fileName());
|
||||||
break;
|
break;
|
||||||
case ContentManager::InstallResult::Overwrite:
|
case ContentManager::InstallResult::Overwrite:
|
||||||
@@ -4119,7 +4119,7 @@ bool GMainWindow::question(QWidget* parent, const QString& title, const QString&
|
|||||||
new ControllerNavigation(system->HIDCore(), box_dialog);
|
new ControllerNavigation(system->HIDCore(), box_dialog);
|
||||||
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
|
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
|
||||||
[box_dialog](Qt::Key key) {
|
[box_dialog](Qt::Key key) {
|
||||||
QKeyEvent* event = new QKeyEvent(QEvent::Type::KeyPress, key, Qt::NoModifier);
|
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier);
|
||||||
QCoreApplication::postEvent(box_dialog, event);
|
QCoreApplication::postEvent(box_dialog, event);
|
||||||
});
|
});
|
||||||
int res = box_dialog->exec();
|
int res = box_dialog->exec();
|
||||||
@@ -5034,7 +5034,7 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe
|
|||||||
const auto entries = installed.ListEntriesFilter(title_type, record_type);
|
const auto entries = installed.ListEntriesFilter(title_type, record_type);
|
||||||
for (const auto& entry : entries) {
|
for (const auto& entry : entries) {
|
||||||
if (FileSys::GetBaseTitleID(entry.title_id) == program_id &&
|
if (FileSys::GetBaseTitleID(entry.title_id) == program_id &&
|
||||||
installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::LoaderSuccess) {
|
installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::Success) {
|
||||||
available_title_ids.insert({entry.title_id, title_type, record_type});
|
available_title_ids.insert({entry.title_id, title_type, record_type});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ void UpdaterDialog::OnUpdateCompleted(Updater::UpdaterService::UpdateResult resu
|
|||||||
progress_timer->stop();
|
progress_timer->stop();
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case Updater::UpdaterService::UpdateResult::UpdateSuccess:
|
case Updater::UpdaterService::UpdateResult::Success:
|
||||||
ShowCompletedState();
|
ShowCompletedState();
|
||||||
break;
|
break;
|
||||||
case Updater::UpdaterService::UpdateResult::Cancelled:
|
case Updater::UpdaterService::UpdateResult::Cancelled:
|
||||||
@@ -329,7 +329,7 @@ QString UpdaterDialog::FormatBytes(qint64 bytes) const {
|
|||||||
|
|
||||||
QString UpdaterDialog::GetUpdateMessage(Updater::UpdaterService::UpdateResult result) const {
|
QString UpdaterDialog::GetUpdateMessage(Updater::UpdaterService::UpdateResult result) const {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case Updater::UpdaterService::UpdateResult::UpdateSuccess:
|
case Updater::UpdaterService::UpdateResult::Success:
|
||||||
return QStringLiteral("Update completed successfully!");
|
return QStringLiteral("Update completed successfully!");
|
||||||
case Updater::UpdaterService::UpdateResult::Failed:
|
case Updater::UpdaterService::UpdateResult::Failed:
|
||||||
return QStringLiteral("Update failed due to an unknown error.");
|
return QStringLiteral("Update failed due to an unknown error.");
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ void UpdaterService::OnDownloadFinished() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
emit UpdateInstallProgress(100, QStringLiteral("Update completed successfully!"));
|
emit UpdateInstallProgress(100, QStringLiteral("Update completed successfully!"));
|
||||||
emit UpdateCompleted(UpdateResult::UpdateSuccess, QStringLiteral("Update installed successfully. Please restart the application."));
|
emit UpdateCompleted(UpdateResult::Success, QStringLiteral("Update installed successfully. Please restart the application."));
|
||||||
|
|
||||||
update_in_progress.store(false);
|
update_in_progress.store(false);
|
||||||
CleanupFiles();
|
CleanupFiles();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class UpdaterService : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum class UpdateResult {
|
enum class UpdateResult {
|
||||||
UpdateSuccess,
|
Success,
|
||||||
Failed,
|
Failed,
|
||||||
Cancelled,
|
Cancelled,
|
||||||
NetworkError,
|
NetworkError,
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ int main(int argc, char** argv) {
|
|||||||
case Core::SystemResultStatus::ErrorVideoCore:
|
case Core::SystemResultStatus::ErrorVideoCore:
|
||||||
LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
|
LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
|
||||||
return -1;
|
return -1;
|
||||||
case Core::SystemResultStatus::SystemSuccess:
|
case Core::SystemResultStatus::Success:
|
||||||
break; // Expected case
|
break; // Expected case
|
||||||
default:
|
default:
|
||||||
if (static_cast<u32>(load_result) >
|
if (static_cast<u32>(load_result) >
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ struct System::Impl {
|
|||||||
|
|
||||||
LOG_DEBUG(Core, "Initialized OK");
|
LOG_DEBUG(Core, "Initialized OK");
|
||||||
|
|
||||||
return SystemResultStatus::SystemSuccess;
|
return SystemResultStatus::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window,
|
SystemResultStatus Load(System& system, Frontend::EmuWindow& emu_window,
|
||||||
@@ -347,7 +347,7 @@ struct System::Impl {
|
|||||||
|
|
||||||
// Set up the rest of the system.
|
// Set up the rest of the system.
|
||||||
SystemResultStatus init_result{SetupForApplicationProcess(system, emu_window)};
|
SystemResultStatus init_result{SetupForApplicationProcess(system, emu_window)};
|
||||||
if (init_result != SystemResultStatus::SystemSuccess) {
|
if (init_result != SystemResultStatus::Success) {
|
||||||
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
|
LOG_CRITICAL(Core, "Failed to initialize system (Error {})!",
|
||||||
static_cast<int>(init_result));
|
static_cast<int>(init_result));
|
||||||
ShutdownMainProcess();
|
ShutdownMainProcess();
|
||||||
@@ -394,7 +394,7 @@ struct System::Impl {
|
|||||||
room_member->SendGameInfo(game_info);
|
room_member->SendGameInfo(game_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = SystemResultStatus::SystemSuccess;
|
status = SystemResultStatus::Success;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@ struct System::Impl {
|
|||||||
/// Debugger
|
/// Debugger
|
||||||
std::unique_ptr<Core::Debugger> debugger;
|
std::unique_ptr<Core::Debugger> debugger;
|
||||||
|
|
||||||
SystemResultStatus status = SystemResultStatus::SystemSuccess;
|
SystemResultStatus status = SystemResultStatus::Success;
|
||||||
std::string status_details = "";
|
std::string status_details = "";
|
||||||
|
|
||||||
std::unique_ptr<Core::PerfStats> perf_stats;
|
std::unique_ptr<Core::PerfStats> perf_stats;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
|
|||||||
|
|
||||||
/// Enumeration representing the return values of the System Initialize and Load process.
|
/// Enumeration representing the return values of the System Initialize and Load process.
|
||||||
enum class SystemResultStatus : u32 {
|
enum class SystemResultStatus : u32 {
|
||||||
SystemSuccess, ///< Succeeded
|
Success, ///< Succeeded
|
||||||
ErrorNotInitialized, ///< Error trying to use core prior to initialization
|
ErrorNotInitialized, ///< Error trying to use core prior to initialization
|
||||||
ErrorGetLoader, ///< Error finding the correct application loader
|
ErrorGetLoader, ///< Error finding the correct application loader
|
||||||
ErrorSystemFiles, ///< Error in finding system files
|
ErrorSystemFiles, ///< Error in finding system files
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ bool PlaceholderCache::Register(RegisteredCache* cache, const NcaID& placeholder
|
|||||||
|
|
||||||
const auto res = cache->RawInstallNCA(NCA{file}, &VfsRawCopy, false, install);
|
const auto res = cache->RawInstallNCA(NCA{file}, &VfsRawCopy, false, install);
|
||||||
|
|
||||||
if (res != InstallResult::InstallSuccess)
|
if (res != InstallResult::Success)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return Delete(placeholder);
|
return Delete(placeholder);
|
||||||
@@ -609,7 +609,7 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex
|
|||||||
|
|
||||||
// Install Metadata File
|
// Install Metadata File
|
||||||
const auto meta_result = RawInstallNCA(**meta_iter, copy, overwrite_if_exists, meta_id_data);
|
const auto meta_result = RawInstallNCA(**meta_iter, copy, overwrite_if_exists, meta_id_data);
|
||||||
if (meta_result != InstallResult::InstallSuccess) {
|
if (meta_result != InstallResult::Success) {
|
||||||
return meta_result;
|
return meta_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -628,13 +628,13 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex
|
|||||||
// Create fake cnmt for patch to multiprogram application
|
// Create fake cnmt for patch to multiprogram application
|
||||||
const auto sub_nca_result =
|
const auto sub_nca_result =
|
||||||
InstallEntry(*nca, cnmt.GetHeader(), record, overwrite_if_exists, copy);
|
InstallEntry(*nca, cnmt.GetHeader(), record, overwrite_if_exists, copy);
|
||||||
if (sub_nca_result != InstallResult::InstallSuccess) {
|
if (sub_nca_result != InstallResult::Success) {
|
||||||
return sub_nca_result;
|
return sub_nca_result;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const auto nca_result = RawInstallNCA(*nca, copy, overwrite_if_exists, record.nca_id);
|
const auto nca_result = RawInstallNCA(*nca, copy, overwrite_if_exists, record.nca_id);
|
||||||
if (nca_result != InstallResult::InstallSuccess) {
|
if (nca_result != InstallResult::Success) {
|
||||||
return nca_result;
|
return nca_result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -643,7 +643,7 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex
|
|||||||
if (result) {
|
if (result) {
|
||||||
return InstallResult::OverwriteExisting;
|
return InstallResult::OverwriteExisting;
|
||||||
}
|
}
|
||||||
return InstallResult::InstallSuccess;
|
return InstallResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type,
|
InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type,
|
||||||
@@ -798,7 +798,7 @@ InstallResult RegisteredCache::RawInstallNCA(const NCA& nca, const VfsCopyFuncti
|
|||||||
if (out == nullptr) {
|
if (out == nullptr) {
|
||||||
return InstallResult::ErrorCopyFailed;
|
return InstallResult::ErrorCopyFailed;
|
||||||
}
|
}
|
||||||
return copy(in, out, VFS_RC_LARGE_COPY_BLOCK) ? InstallResult::InstallSuccess
|
return copy(in, out, VFS_RC_LARGE_COPY_BLOCK) ? InstallResult::Success
|
||||||
: InstallResult::ErrorCopyFailed;
|
: InstallResult::ErrorCopyFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ using ContentProviderParsingFunction = std::function<VirtualFile(const VirtualFi
|
|||||||
using VfsCopyFunction = std::function<bool(const VirtualFile&, const VirtualFile&, size_t)>;
|
using VfsCopyFunction = std::function<bool(const VirtualFile&, const VirtualFile&, size_t)>;
|
||||||
|
|
||||||
enum class InstallResult {
|
enum class InstallResult {
|
||||||
InstallSuccess,
|
Success,
|
||||||
OverwriteExisting,
|
OverwriteExisting,
|
||||||
ErrorAlreadyExists,
|
ErrorAlreadyExists,
|
||||||
ErrorCopyFailed,
|
ErrorCopyFailed,
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ std::string GetFileTypeString(FileType type);
|
|||||||
|
|
||||||
/// Return type for functions in Loader namespace
|
/// Return type for functions in Loader namespace
|
||||||
enum class ResultStatus : u16 {
|
enum class ResultStatus : u16 {
|
||||||
LoaderSuccess,
|
Success,
|
||||||
ErrorAlreadyLoaded,
|
ErrorAlreadyLoaded,
|
||||||
ErrorNotImplemented,
|
ErrorNotImplemented,
|
||||||
ErrorNotInitialized,
|
ErrorNotInitialized,
|
||||||
|
|||||||
@@ -21,14 +21,14 @@
|
|||||||
namespace ContentManager {
|
namespace ContentManager {
|
||||||
|
|
||||||
enum class InstallResult {
|
enum class InstallResult {
|
||||||
InstallSuccess,
|
Success,
|
||||||
Overwrite,
|
Overwrite,
|
||||||
Failure,
|
Failure,
|
||||||
BaseInstallAttempted,
|
BaseInstallAttempted,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class GameVerificationResult {
|
enum class GameVerificationResult {
|
||||||
VerificationSuccess,
|
Success,
|
||||||
Failed,
|
Failed,
|
||||||
NotImplemented,
|
NotImplemented,
|
||||||
};
|
};
|
||||||
@@ -169,7 +169,7 @@ inline InstallResult InstallNSP(Core::System& system, FileSys::VfsFilesystem& vf
|
|||||||
return InstallResult::Failure;
|
return InstallResult::Failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nsp->GetStatus() != Loader::ResultStatus::LoaderSuccess) {
|
if (nsp->GetStatus() != Loader::ResultStatus::Success) {
|
||||||
return InstallResult::Failure;
|
return InstallResult::Failure;
|
||||||
}
|
}
|
||||||
const auto res =
|
const auto res =
|
||||||
@@ -229,7 +229,7 @@ inline InstallResult InstallNCA(FileSys::VfsFilesystem& vfs, const std::string&
|
|||||||
const auto id = nca->GetStatus();
|
const auto id = nca->GetStatus();
|
||||||
|
|
||||||
// Game updates necessary are missing base RomFS
|
// Game updates necessary are missing base RomFS
|
||||||
if (id != Loader::ResultStatus::LoaderSuccess &&
|
if (id != Loader::ResultStatus::Success &&
|
||||||
id != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) {
|
id != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS) {
|
||||||
return InstallResult::Failure;
|
return InstallResult::Failure;
|
||||||
}
|
}
|
||||||
@@ -306,14 +306,14 @@ inline std::vector<std::string> VerifyInstalledContents(
|
|||||||
if (cancelled) {
|
if (cancelled) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (status != Loader::ResultStatus::LoaderSuccess) {
|
if (status != Loader::ResultStatus::Success) {
|
||||||
FileSys::NCA nca(nca_file);
|
FileSys::NCA nca(nca_file);
|
||||||
const auto title_id = nca.GetTitleId();
|
const auto title_id = nca.GetTitleId();
|
||||||
std::string title_name = "unknown";
|
std::string title_name = "unknown";
|
||||||
|
|
||||||
const auto control = provider.GetEntry(FileSys::GetBaseTitleID(title_id),
|
const auto control = provider.GetEntry(FileSys::GetBaseTitleID(title_id),
|
||||||
FileSys::ContentRecordType::Control);
|
FileSys::ContentRecordType::Control);
|
||||||
if (control && control->GetStatus() == Loader::ResultStatus::LoaderSuccess) {
|
if (control && control->GetStatus() == Loader::ResultStatus::Success) {
|
||||||
const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
|
const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
|
||||||
provider};
|
provider};
|
||||||
const auto [nacp, logo] = pm.ParseControlNCA(*control);
|
const auto [nacp, logo] = pm.ParseControlNCA(*control);
|
||||||
@@ -367,7 +367,7 @@ inline GameVerificationResult VerifyGameContents(
|
|||||||
if (status == Loader::ResultStatus::ErrorIntegrityVerificationFailed) {
|
if (status == Loader::ResultStatus::ErrorIntegrityVerificationFailed) {
|
||||||
return GameVerificationResult::Failed;
|
return GameVerificationResult::Failed;
|
||||||
}
|
}
|
||||||
return GameVerificationResult::VerificationSuccess;
|
return GameVerificationResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user