mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
parent
fda2fdae69
commit
0c5b91e1fb
|
@ -1,8 +1,6 @@
|
||||||
// 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 <QHeaderView>
|
|
||||||
|
|
||||||
#include "elf_viewer.h"
|
#include "elf_viewer.h"
|
||||||
|
|
||||||
ElfViewer::ElfViewer(QWidget* parent) : QTableWidget(parent) {
|
ElfViewer::ElfViewer(QWidget* parent) : QTableWidget(parent) {
|
||||||
|
|
|
@ -3,17 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ranges>
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QMenuBar>
|
|
||||||
#include <QScrollBar>
|
|
||||||
#include <QTableWidget>
|
|
||||||
#include <QTextEdit>
|
|
||||||
#include <QTreeView>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
#include "core/loader/elf.h"
|
#include "core/loader/elf.h"
|
||||||
#include "game_list_frame.h"
|
#include "game_list_frame.h"
|
||||||
|
|
|
@ -3,17 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
|
||||||
#include <QGraphicsBlurEffect>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QStyleOptionViewItem>
|
|
||||||
#include <QTableWidget>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QtConcurrent/QtConcurrent>
|
|
||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "game_info.h"
|
#include "game_info.h"
|
||||||
|
|
|
@ -1,10 +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 <future>
|
|
||||||
#include <thread>
|
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
|
||||||
|
|
||||||
#include "game_info.h"
|
#include "game_info.h"
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QFuture>
|
#include <QFutureWatcher>
|
||||||
#include <QObject>
|
#include <QtConcurrent>
|
||||||
#include <QPixmap>
|
|
||||||
#include <QtConcurrent/QtConcurrent>
|
|
||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "core/file_format/psf.h"
|
#include "core/file_format/psf.h"
|
||||||
|
|
|
@ -3,19 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
|
||||||
#include <QGraphicsBlurEffect>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QStyleOptionViewItem>
|
|
||||||
#include <QTableWidget>
|
|
||||||
#include <QTableWidgetItem>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QtConcurrent/QtConcurrent>
|
|
||||||
|
|
||||||
#include "game_info.h"
|
#include "game_info.h"
|
||||||
#include "game_list_utils.h"
|
#include "game_list_utils.h"
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
#include <QDirIterator>
|
|
||||||
#include <QImage>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
struct GameInfo {
|
struct GameInfo {
|
||||||
std::string path; // root path of game directory (normaly directory that contains eboot.bin)
|
std::string path; // root path of game directory (normaly directory that contains eboot.bin)
|
||||||
std::string icon_path; // path of icon0.png
|
std::string icon_path; // path of icon0.png
|
||||||
|
|
|
@ -4,17 +4,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QFile>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QImage>
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPixmap>
|
|
||||||
#include <QStandardPaths>
|
|
||||||
#include <QTableWidget>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
|
@ -84,7 +76,7 @@ public:
|
||||||
QTableWidget* tableWidget = new QTableWidget(rows, 2);
|
QTableWidget* tableWidget = new QTableWidget(rows, 2);
|
||||||
tableWidget->setAttribute(Qt::WA_DeleteOnClose);
|
tableWidget->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(widget->parent(), &QWidget::destroyed, tableWidget,
|
connect(widget->parent(), &QWidget::destroyed, tableWidget,
|
||||||
[widget, tableWidget]() { tableWidget->deleteLater(); });
|
[tableWidget]() { tableWidget->deleteLater(); });
|
||||||
|
|
||||||
tableWidget->verticalHeader()->setVisible(false); // Hide vertical header
|
tableWidget->verticalHeader()->setVisible(false); // Hide vertical header
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
@ -135,7 +127,7 @@ public:
|
||||||
TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath);
|
TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath);
|
||||||
trophyViewer->show();
|
trophyViewer->show();
|
||||||
connect(widget->parent(), &QWidget::destroyed, trophyViewer,
|
connect(widget->parent(), &QWidget::destroyed, trophyViewer,
|
||||||
[widget, trophyViewer]() { trophyViewer->deleteLater(); });
|
[trophyViewer]() { trophyViewer->deleteLater(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected == &createShortcut) {
|
if (selected == &createShortcut) {
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
// 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 <QtWidgets/QApplication>
|
|
||||||
#include <fmt/core.h>
|
|
||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "core/file_sys/fs.h"
|
#include "core/file_sys/fs.h"
|
||||||
#include "emulator.h"
|
#include "emulator.h"
|
||||||
#include "qt_gui/game_install_dialog.h"
|
#include "game_install_dialog.h"
|
||||||
#include "qt_gui/main_window.h"
|
#include "main_window.h"
|
||||||
|
|
||||||
// Custom message handler to ignore Qt logs
|
// Custom message handler to ignore Qt logs
|
||||||
void customMessageHandler(QtMsgType, const QMessageLogContext&, const QString&) {}
|
void customMessageHandler(QtMsgType, const QMessageLogContext&, const QString&) {}
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
// 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 <QDir>
|
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
#include <QStatusBar>
|
|
||||||
#include <QtConcurrent>
|
|
||||||
|
|
||||||
#include "about_dialog.h"
|
#include "about_dialog.h"
|
||||||
#include "common/io_file.h"
|
#include "common/io_file.h"
|
||||||
|
|
|
@ -3,13 +3,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QAbstractButton>
|
|
||||||
#include <QActionGroup>
|
#include <QActionGroup>
|
||||||
#include <QDragEnterEvent>
|
#include <QDragEnterEvent>
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QMimeData>
|
|
||||||
#include <QScopedPointer>
|
|
||||||
#include <fmt/core.h>
|
|
||||||
|
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
#include "common/path_util.h"
|
#include "common/path_util.h"
|
||||||
|
|
|
@ -1,29 +1,11 @@
|
||||||
// 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
|
||||||
|
|
||||||
/********************************************************************************
|
#pragma once
|
||||||
** Form generated from reading UI file 'main_window.ui'
|
|
||||||
**
|
|
||||||
** Created by: Qt User Interface Compiler version 6.6.1
|
|
||||||
**
|
|
||||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
||||||
********************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MAIN_WINDOW_UI_H
|
#include <QMenuBar>
|
||||||
#define MAIN_WINDOW_UI_H
|
#include <QPushButton>
|
||||||
|
#include <QToolBar>
|
||||||
#include <QtCore/QVariant>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtWidgets/QApplication>
|
|
||||||
#include <QtWidgets/QHBoxLayout>
|
|
||||||
#include <QtWidgets/QLineEdit>
|
|
||||||
#include <QtWidgets/QMainWindow>
|
|
||||||
#include <QtWidgets/QMenu>
|
|
||||||
#include <QtWidgets/QMenuBar>
|
|
||||||
#include <QtWidgets/QPushButton>
|
|
||||||
#include <QtWidgets/QSlider>
|
|
||||||
#include <QtWidgets/QToolBar>
|
|
||||||
#include <QtWidgets/QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
@ -370,5 +352,3 @@ class MainWindow : public Ui_MainWindow {};
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // MAIN_WINDOW_UI_H
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
// 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 <QHeaderView>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
#include "pkg_viewer.h"
|
#include "pkg_viewer.h"
|
||||||
|
|
||||||
PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent,
|
PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent,
|
||||||
|
@ -54,7 +51,7 @@ PKGViewer::PKGViewer(std::shared_ptr<GameInfoClass> game_info_get, QWidget* pare
|
||||||
InstallDragDropPkg);
|
InstallDragDropPkg);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(parent, &QWidget::destroyed, this, [parent, this]() { this->deleteLater(); });
|
connect(parent, &QWidget::destroyed, this, [this]() { this->deleteLater(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
PKGViewer::~PKGViewer() {}
|
PKGViewer::~PKGViewer() {}
|
||||||
|
|
|
@ -3,18 +3,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <filesystem>
|
|
||||||
#include <string>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <vector>
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QTreeWidget>
|
|
||||||
#include <QTreeWidgetItem>
|
|
||||||
#include <QtConcurrent/QtConcurrent>
|
|
||||||
|
|
||||||
#include "common/io_file.h"
|
#include "common/io_file.h"
|
||||||
#include "core/file_format/pkg.h"
|
#include "core/file_format/pkg.h"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
|
|
||||||
#include "settings_dialog.h"
|
#include "settings_dialog.h"
|
||||||
#include "ui_settings_dialog.h"
|
#include "ui_settings_dialog.h"
|
||||||
|
|
||||||
|
@ -86,7 +87,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
||||||
[](const QString& text) { Config::setUserName(text.toStdString()); });
|
[](const QString& text) { Config::setUserName(text.toStdString()); });
|
||||||
|
|
||||||
connect(ui->consoleLanguageComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(ui->consoleLanguageComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, [this](int index) {
|
this, [](int index) {
|
||||||
if (index >= 0 && index < languageIndexes.size()) {
|
if (index >= 0 && index < languageIndexes.size()) {
|
||||||
int languageCode = languageIndexes[index];
|
int languageCode = languageIndexes[index];
|
||||||
Config::setLanguage(languageCode);
|
Config::setLanguage(languageCode);
|
||||||
|
|
|
@ -10,11 +10,9 @@
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QStyleOptionViewItem>
|
|
||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
#include <QTableWidgetItem>
|
#include <QTableWidgetItem>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QWidget>
|
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
|
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
|
@ -124,7 +124,7 @@ private:
|
||||||
using FuncReturn = typename std::invoke_result<Func, ImageId, Image&>::type;
|
using FuncReturn = typename std::invoke_result<Func, ImageId, Image&>::type;
|
||||||
static constexpr bool BOOL_BREAK = std::is_same_v<FuncReturn, bool>;
|
static constexpr bool BOOL_BREAK = std::is_same_v<FuncReturn, bool>;
|
||||||
boost::container::small_vector<ImageId, 32> images;
|
boost::container::small_vector<ImageId, 32> images;
|
||||||
ForEachPage(cpu_addr, size, [this, &images, cpu_addr, size, func](u64 page) {
|
ForEachPage(cpu_addr, size, [this, &images, func](u64 page) {
|
||||||
const auto it = page_table.find(page);
|
const auto it = page_table.find(page);
|
||||||
if (it == nullptr) {
|
if (it == nullptr) {
|
||||||
if constexpr (BOOL_BREAK) {
|
if constexpr (BOOL_BREAK) {
|
||||||
|
|
Loading…
Reference in a new issue