mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 14:53:18 +00:00
Add error message when trophy data extraction fails (#2393)
Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
This commit is contained in:
parent
50b27bebd8
commit
3b1840b7a9
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
#include "common/path_util.h"
|
#include "common/path_util.h"
|
||||||
#include "trophy_viewer.h"
|
#include "trophy_viewer.h"
|
||||||
|
|
||||||
|
@ -29,8 +30,13 @@ void TrophyViewer::PopulateTrophyWidget(QString title) {
|
||||||
QDir dir(trophyDirQt);
|
QDir dir(trophyDirQt);
|
||||||
if (!dir.exists()) {
|
if (!dir.exists()) {
|
||||||
std::filesystem::path path = Common::FS::PathFromQString(gameTrpPath_);
|
std::filesystem::path path = Common::FS::PathFromQString(gameTrpPath_);
|
||||||
if (!trp.Extract(path, title.toStdString()))
|
if (!trp.Extract(path, title.toStdString())) {
|
||||||
|
QMessageBox::critical(this, "Trophy Data Extraction Error",
|
||||||
|
"Unable to extract Trophy data, please ensure you have "
|
||||||
|
"inputted a trophy key in the settings menu.");
|
||||||
|
QWidget::close();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QFileInfoList dirList = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
QFileInfoList dirList = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
if (dirList.isEmpty())
|
if (dirList.isEmpty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue