qt_common init
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
4c5d03f5de
commit
d2541dde75
56 changed files with 233 additions and 153 deletions
40
ffmpeg.patch
Normal file
40
ffmpeg.patch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt
|
||||||
|
index 54c852f831..ff35c8dc2c 100644
|
||||||
|
--- a/externals/ffmpeg/CMakeLists.txt
|
||||||
|
+++ b/externals/ffmpeg/CMakeLists.txt
|
||||||
|
@@ -63,20 +63,22 @@ if (NOT WIN32 AND NOT ANDROID)
|
||||||
|
set(FFmpeg_HWACCEL_INCLUDE_DIRS)
|
||||||
|
set(FFmpeg_HWACCEL_LDFLAGS)
|
||||||
|
|
||||||
|
- # In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||||
|
- if(PLATFORM_SUN)
|
||||||
|
- list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
|
- X11
|
||||||
|
- "/usr/lib/xorg/amd64/libdrm.so")
|
||||||
|
- else()
|
||||||
|
- pkg_check_modules(LIBDRM libdrm REQUIRED)
|
||||||
|
- list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
|
- ${LIBDRM_LIBRARIES})
|
||||||
|
- list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||||
|
- ${LIBDRM_INCLUDE_DIRS})
|
||||||
|
+ if (NOT APPLE)
|
||||||
|
+ # In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||||
|
+ if(PLATFORM_SUN)
|
||||||
|
+ list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
|
+ X11
|
||||||
|
+ "/usr/lib/xorg/amd64/libdrm.so")
|
||||||
|
+ else()
|
||||||
|
+ pkg_check_modules(LIBDRM libdrm REQUIRED)
|
||||||
|
+ list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
|
+ ${LIBDRM_LIBRARIES})
|
||||||
|
+ list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||||
|
+ ${LIBDRM_INCLUDE_DIRS})
|
||||||
|
+ endif()
|
||||||
|
+ list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||||
|
+ --enable-libdrm)
|
||||||
|
endif()
|
||||||
|
- list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||||
|
- --enable-libdrm)
|
||||||
|
|
||||||
|
if(LIBVA_FOUND)
|
||||||
|
find_package(X11 REQUIRED)
|
|
@ -234,6 +234,7 @@ if (YUZU_ROOM_STANDALONE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_QT)
|
if (ENABLE_QT)
|
||||||
|
add_subdirectory(qt_common)
|
||||||
add_subdirectory(yuzu)
|
add_subdirectory(yuzu)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
23
src/qt_common/CMakeLists.txt
Normal file
23
src/qt_common/CMakeLists.txt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
add_library(qt_common STATIC
|
||||||
|
qt_common.h
|
||||||
|
qt_common.cpp
|
||||||
|
|
||||||
|
uisettings.cpp
|
||||||
|
uisettings.h
|
||||||
|
|
||||||
|
qt_config.cpp
|
||||||
|
qt_config.h
|
||||||
|
|
||||||
|
shared_translation.cpp
|
||||||
|
shared_translation.h
|
||||||
|
)
|
||||||
|
|
||||||
|
create_target_directory_groups(qt_common)
|
||||||
|
target_link_libraries(qt_common PUBLIC core Qt6::Core Qt6::Gui SimpleIni::SimpleIni)
|
||||||
|
|
||||||
|
if (NOT WIN32)
|
||||||
|
target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
|
endif()
|
|
@ -1,12 +1,13 @@
|
||||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
#include "qt_common.h"
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
#include "common/fs/fs.h"
|
||||||
|
#include "common/fs/path_util.h"
|
||||||
|
#include "uisettings.h"
|
||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QStringLiteral>
|
#include <QStringLiteral>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/frontend/emu_window.h"
|
#include "core/frontend/emu_window.h"
|
||||||
#include "yuzu/qt_common.h"
|
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__APPLE__)
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
#include <qpa/qplatformnativeinterface.h>
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
|
@ -15,6 +16,21 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace QtCommon {
|
namespace QtCommon {
|
||||||
|
|
||||||
|
MetadataResult ResetMetadata()
|
||||||
|
{
|
||||||
|
if (!Common::FS::Exists(Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir)
|
||||||
|
/ "game_list/")) {
|
||||||
|
return Empty;
|
||||||
|
} else if (Common::FS::RemoveDirRecursively(
|
||||||
|
Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) / "game_list")) {
|
||||||
|
return Success;
|
||||||
|
UISettings::values.is_game_list_reload_pending.exchange(true);
|
||||||
|
} else {
|
||||||
|
return Failure;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Core::Frontend::WindowSystemType GetWindowSystemType() {
|
Core::Frontend::WindowSystemType GetWindowSystemType() {
|
||||||
// Determine WSI type based on Qt platform.
|
// Determine WSI type based on Qt platform.
|
||||||
QString platform_name = QGuiApplication::platformName();
|
QString platform_name = QGuiApplication::platformName();
|
||||||
|
@ -57,4 +73,5 @@ Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow* window)
|
||||||
|
|
||||||
return wsi;
|
return wsi;
|
||||||
}
|
}
|
||||||
} // namespace QtCommon
|
|
||||||
|
}
|
47
src/qt_common/qt_common.h
Normal file
47
src/qt_common/qt_common.h
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
#ifndef QT_COMMON_H
|
||||||
|
#define QT_COMMON_H
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
#include <QWindow>
|
||||||
|
#include <core/frontend/emu_window.h>
|
||||||
|
|
||||||
|
namespace QtCommon {
|
||||||
|
|
||||||
|
static constexpr std::array<const char *, 3> METADATA_RESULTS = {
|
||||||
|
"The operation completed successfully.",
|
||||||
|
"The metadata cache couldn't be deleted. It might be in use or non-existent.",
|
||||||
|
"The metadata cache is already empty.",
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MetadataResult {
|
||||||
|
Success,
|
||||||
|
Failure,
|
||||||
|
Empty,
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @brief ResetMetadata Reset game list metadata.
|
||||||
|
* @return A result code.
|
||||||
|
*/
|
||||||
|
MetadataResult ResetMetadata();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get a string representation of a result from ResetMetadata.
|
||||||
|
* \param result The result code.
|
||||||
|
* \return A string representation of the passed result code.
|
||||||
|
*/
|
||||||
|
inline constexpr const char *GetResetMetadataResultString(MetadataResult result)
|
||||||
|
{
|
||||||
|
return METADATA_RESULTS.at(static_cast<std::size_t>(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
Core::Frontend::WindowSystemType GetWindowSystemType();
|
||||||
|
|
||||||
|
Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow* window);
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace QtCommon
|
||||||
|
#endif
|
|
@ -7,23 +7,21 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "shared_translation.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QWidget>
|
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "common/settings_enums.h"
|
#include "common/settings_enums.h"
|
||||||
#include "common/settings_setting.h"
|
#include "common/settings_setting.h"
|
||||||
#include "common/time_zone.h"
|
#include "common/time_zone.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <tuple>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace ConfigurationShared {
|
namespace ConfigurationShared {
|
||||||
|
|
||||||
std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
|
std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent)
|
||||||
{
|
{
|
||||||
std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>();
|
std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>();
|
||||||
const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); };
|
const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); };
|
||||||
|
@ -473,7 +471,7 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
|
||||||
return translations;
|
return translations;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent)
|
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent)
|
||||||
{
|
{
|
||||||
std::unique_ptr<ComboboxTranslationMap> translations = std::make_unique<ComboboxTranslationMap>();
|
std::unique_ptr<ComboboxTranslationMap> translations = std::make_unique<ComboboxTranslationMap>();
|
||||||
const auto& tr = [&](const char* text, const char* context = "") {
|
const auto& tr = [&](const char* text, const char* context = "") {
|
|
@ -11,23 +11,20 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <typeindex>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings_enums.h"
|
||||||
|
|
||||||
class QWidget;
|
|
||||||
|
|
||||||
namespace ConfigurationShared {
|
namespace ConfigurationShared {
|
||||||
using TranslationMap = std::map<u32, std::pair<QString, QString>>;
|
using TranslationMap = std::map<u32, std::pair<QString, QString>>;
|
||||||
using ComboboxTranslations = std::vector<std::pair<u32, QString>>;
|
using ComboboxTranslations = std::vector<std::pair<u32, QString>>;
|
||||||
using ComboboxTranslationMap = std::map<u32, ComboboxTranslations>;
|
using ComboboxTranslationMap = std::map<u32, ComboboxTranslations>;
|
||||||
|
|
||||||
std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent);
|
std::unique_ptr<TranslationMap> InitializeTranslations(QObject *parent);
|
||||||
|
|
||||||
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent);
|
std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent);
|
||||||
|
|
||||||
static const std::map<Settings::AntiAliasing, QString> anti_aliasing_texts_map = {
|
static const std::map<Settings::AntiAliasing, QString> anti_aliasing_texts_map = {
|
||||||
{Settings::AntiAliasing::None, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "None"))},
|
{Settings::AntiAliasing::None, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "None"))},
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include "common/fs/fs.h"
|
#include "common/fs/fs.h"
|
||||||
#include "common/fs/path_util.h"
|
#include "common/fs/path_util.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
#ifndef CANNOT_EXPLICITLY_INSTANTIATE
|
#ifndef CANNOT_EXPLICITLY_INSTANTIATE
|
||||||
namespace Settings {
|
namespace Settings {
|
|
@ -17,7 +17,7 @@
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "common/settings_enums.h"
|
#include "common/settings_enums.h"
|
||||||
#include "configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
|
|
||||||
using Settings::Category;
|
using Settings::Category;
|
||||||
using Settings::ConfirmStop;
|
using Settings::ConfirmStop;
|
|
@ -150,12 +150,8 @@ add_executable(yuzu
|
||||||
configuration/configure_web.ui
|
configuration/configure_web.ui
|
||||||
configuration/input_profiles.cpp
|
configuration/input_profiles.cpp
|
||||||
configuration/input_profiles.h
|
configuration/input_profiles.h
|
||||||
configuration/shared_translation.cpp
|
|
||||||
configuration/shared_translation.h
|
|
||||||
configuration/shared_widget.cpp
|
configuration/shared_widget.cpp
|
||||||
configuration/shared_widget.h
|
configuration/shared_widget.h
|
||||||
configuration/qt_config.cpp
|
|
||||||
configuration/qt_config.h
|
|
||||||
debugger/console.cpp
|
debugger/console.cpp
|
||||||
debugger/console.h
|
debugger/console.h
|
||||||
debugger/controller.cpp
|
debugger/controller.cpp
|
||||||
|
@ -205,12 +201,8 @@ add_executable(yuzu
|
||||||
play_time_manager.cpp
|
play_time_manager.cpp
|
||||||
play_time_manager.h
|
play_time_manager.h
|
||||||
precompiled_headers.h
|
precompiled_headers.h
|
||||||
qt_common.cpp
|
|
||||||
qt_common.h
|
|
||||||
startup_checks.cpp
|
startup_checks.cpp
|
||||||
startup_checks.h
|
startup_checks.h
|
||||||
uisettings.cpp
|
|
||||||
uisettings.h
|
|
||||||
util/clickable_label.cpp
|
util/clickable_label.cpp
|
||||||
util/clickable_label.h
|
util/clickable_label.h
|
||||||
util/controller_navigation.cpp
|
util/controller_navigation.cpp
|
||||||
|
@ -396,14 +388,17 @@ elseif(WIN32)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core)
|
|
||||||
target_link_libraries(yuzu PRIVATE nlohmann_json::nlohmann_json)
|
target_link_libraries(yuzu PRIVATE nlohmann_json::nlohmann_json)
|
||||||
|
target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core qt_common)
|
||||||
target_link_libraries(yuzu PRIVATE Boost::headers glad Qt6::Widgets)
|
target_link_libraries(yuzu PRIVATE Boost::headers glad Qt6::Widgets)
|
||||||
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
target_include_directories(yuzu PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
target_include_directories(yuzu PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(yuzu PRIVATE Vulkan::Headers)
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(yuzu PRIVATE Qt6::DBus)
|
target_link_libraries(yuzu PRIVATE Qt6::DBus)
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#include "common/settings_enums.h"
|
#include "common/settings_enums.h"
|
||||||
#include "uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA
|
||||||
#include <QCamera>
|
#include <QCamera>
|
||||||
#include <QCameraImageCapture>
|
#include <QCameraImageCapture>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
#include "yuzu/bootmanager.h"
|
#include "yuzu/bootmanager.h"
|
||||||
#include "yuzu/main.h"
|
#include "yuzu/main.h"
|
||||||
#include "yuzu/qt_common.h"
|
#include "qt_common/qt_common.h"
|
||||||
|
|
||||||
class QObject;
|
class QObject;
|
||||||
class QPaintEngine;
|
class QPaintEngine;
|
||||||
|
@ -234,7 +234,7 @@ class DummyContext : public Core::Frontend::GraphicsContext {};
|
||||||
|
|
||||||
class RenderWidget : public QWidget {
|
class RenderWidget : public QWidget {
|
||||||
public:
|
public:
|
||||||
explicit RenderWidget(GRenderWindow* parent) : QWidget(parent), render_window(parent) {
|
explicit RenderWidget(GRenderWindow* parent) : QWidget(parent) {
|
||||||
setAttribute(Qt::WA_NativeWindow);
|
setAttribute(Qt::WA_NativeWindow);
|
||||||
setAttribute(Qt::WA_PaintOnScreen);
|
setAttribute(Qt::WA_PaintOnScreen);
|
||||||
if (QtCommon::GetWindowSystemType() == Core::Frontend::WindowSystemType::Wayland) {
|
if (QtCommon::GetWindowSystemType() == Core::Frontend::WindowSystemType::Wayland) {
|
||||||
|
@ -247,9 +247,6 @@ public:
|
||||||
QPaintEngine* paintEngine() const override {
|
QPaintEngine* paintEngine() const override {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
GRenderWindow* render_window;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OpenGLRenderWidget : public RenderWidget {
|
struct OpenGLRenderWidget : public RenderWidget {
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
#include "ui_configure_audio.h"
|
#include "ui_configure_audio.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_audio.h"
|
#include "yuzu/configuration/configure_audio.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
#include "yuzu/configuration/shared_widget.h"
|
#include "yuzu/configuration/shared_widget.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureAudio::ConfigureAudio(const Core::System& system_,
|
ConfigureAudio::ConfigureAudio(const Core::System& system_,
|
||||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "ui_configure_debug.h"
|
#include "ui_configure_debug.h"
|
||||||
#include "yuzu/configuration/configure_debug.h"
|
#include "yuzu/configuration/configure_debug.h"
|
||||||
#include "yuzu/debugger/console.h"
|
#include "yuzu/debugger/console.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
||||||
: QScrollArea(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
|
: QScrollArea(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "yuzu/configuration/configure_ui.h"
|
#include "yuzu/configuration/configure_ui.h"
|
||||||
#include "yuzu/configuration/configure_web.h"
|
#include "yuzu/configuration/configure_web.h"
|
||||||
#include "yuzu/hotkeys.h"
|
#include "yuzu/hotkeys.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
||||||
InputCommon::InputSubsystem* input_subsystem,
|
InputCommon::InputSubsystem* input_subsystem,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "configuration/shared_widget.h"
|
#include "configuration/shared_widget.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
#include "yuzu/vk_device_info.h"
|
#include "yuzu/vk_device_info.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "yuzu/configuration/configure_filesystem.h"
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "common/fs/fs.h"
|
#include "common/fs/fs.h"
|
||||||
#include "common/fs/path_util.h"
|
#include "common/fs/path_util.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
|
#include "qt_common/qt_common.h"
|
||||||
|
#include "qt_common/uisettings.h"
|
||||||
#include "ui_configure_filesystem.h"
|
#include "ui_configure_filesystem.h"
|
||||||
#include "yuzu/configuration/configure_filesystem.h"
|
|
||||||
#include "yuzu/uisettings.h"
|
|
||||||
|
|
||||||
ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
||||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) {
|
: QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) {
|
||||||
|
@ -126,19 +127,16 @@ void ConfigureFilesystem::SetDirectory(DirectoryTarget target, QLineEdit* edit)
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureFilesystem::ResetMetadata() {
|
void ConfigureFilesystem::ResetMetadata() {
|
||||||
if (!Common::FS::Exists(Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) /
|
auto result = QtCommon::ResetMetadata();
|
||||||
"game_list/")) {
|
const QString resultMessage = tr(QtCommon::GetResetMetadataResultString(result));
|
||||||
QMessageBox::information(this, tr("Reset Metadata Cache"),
|
const QString title = tr("Reset Metadata Cache");
|
||||||
tr("The metadata cache is already empty."));
|
|
||||||
} else if (Common::FS::RemoveDirRecursively(
|
switch (result) {
|
||||||
Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) / "game_list")) {
|
case QtCommon::Failure:
|
||||||
QMessageBox::information(this, tr("Reset Metadata Cache"),
|
QMessageBox::warning(this, title, resultMessage);
|
||||||
tr("The operation completed successfully."));
|
break;
|
||||||
UISettings::values.is_game_list_reload_pending.exchange(true);
|
default:
|
||||||
} else {
|
QMessageBox::information(this, title, resultMessage);
|
||||||
QMessageBox::warning(
|
|
||||||
this, tr("Reset Metadata Cache"),
|
|
||||||
tr("The metadata cache couldn't be deleted. It might be in use or non-existent."));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_general.h"
|
#include "yuzu/configuration/configure_general.h"
|
||||||
#include "yuzu/configuration/shared_widget.h"
|
#include "yuzu/configuration/shared_widget.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureGeneral::ConfigureGeneral(const Core::System& system_,
|
ConfigureGeneral::ConfigureGeneral(const Core::System& system_,
|
||||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_graphics.h"
|
#include "yuzu/configuration/configure_graphics.h"
|
||||||
#include "yuzu/configuration/shared_widget.h"
|
#include "yuzu/configuration/shared_widget.h"
|
||||||
#include "yuzu/qt_common.h"
|
#include "qt_common/qt_common.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/vk_device_info.h"
|
#include "yuzu/vk_device_info.h"
|
||||||
|
|
||||||
static const std::vector<VkPresentModeKHR> default_present_modes{VK_PRESENT_MODE_IMMEDIATE_KHR,
|
static const std::vector<VkPresentModeKHR> default_present_modes{VK_PRESENT_MODE_IMMEDIATE_KHR,
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <vulkan/vulkan_core.h>
|
#include <vulkan/vulkan_core.h>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/settings_enums.h"
|
#include "common/settings_enums.h"
|
||||||
#include "configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
#include "vk_device_info.h"
|
#include "vk_device_info.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "ui_configure_graphics_advanced.h"
|
#include "ui_configure_graphics_advanced.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
#include "yuzu/configuration/shared_widget.h"
|
#include "yuzu/configuration/shared_widget.h"
|
||||||
|
|
||||||
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(
|
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "ui_configure_graphics_extensions.h"
|
#include "ui_configure_graphics_extensions.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
#include "yuzu/configuration/shared_widget.h"
|
#include "yuzu/configuration/shared_widget.h"
|
||||||
|
|
||||||
ConfigureGraphicsExtensions::ConfigureGraphicsExtensions(
|
ConfigureGraphicsExtensions::ConfigureGraphicsExtensions(
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "ui_configure_hotkeys.h"
|
#include "ui_configure_hotkeys.h"
|
||||||
#include "yuzu/configuration/configure_hotkeys.h"
|
#include "yuzu/configuration/configure_hotkeys.h"
|
||||||
#include "yuzu/hotkeys.h"
|
#include "yuzu/hotkeys.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/sequence_dialog/sequence_dialog.h"
|
#include "yuzu/util/sequence_dialog/sequence_dialog.h"
|
||||||
|
|
||||||
constexpr int name_column = 0;
|
constexpr int name_column = 0;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "ui_configure_input_per_game.h"
|
#include "ui_configure_input_per_game.h"
|
||||||
#include "yuzu/configuration/input_profiles.h"
|
#include "yuzu/configuration/input_profiles.h"
|
||||||
#include "yuzu/configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/param_package.h"
|
#include "common/param_package.h"
|
||||||
#include "configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
#include "hid_core/frontend/emulated_controller.h"
|
#include "hid_core/frontend/emulated_controller.h"
|
||||||
#include "hid_core/hid_core.h"
|
#include "hid_core/hid_core.h"
|
||||||
#include "hid_core/hid_types.h"
|
#include "hid_core/hid_types.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "yuzu/configuration/configure_per_game.h"
|
#include "yuzu/configuration/configure_per_game.h"
|
||||||
#include "yuzu/configuration/configure_per_game_addons.h"
|
#include "yuzu/configuration/configure_per_game_addons.h"
|
||||||
#include "yuzu/configuration/configure_system.h"
|
#include "yuzu/configuration/configure_system.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/util.h"
|
#include "yuzu/util/util.h"
|
||||||
#include "yuzu/vk_device_info.h"
|
#include "yuzu/vk_device_info.h"
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
#include "frontend_common/config.h"
|
#include "frontend_common/config.h"
|
||||||
#include "vk_device_info.h"
|
#include "vk_device_info.h"
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class System;
|
class System;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "ui_configure_per_game_addons.h"
|
#include "ui_configure_per_game_addons.h"
|
||||||
#include "yuzu/configuration/configure_input.h"
|
#include "yuzu/configuration/configure_input.h"
|
||||||
#include "yuzu/configuration/configure_per_game_addons.h"
|
#include "yuzu/configuration/configure_per_game_addons.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent)
|
ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigurePerGameAddons>()}, system{system_} {
|
: QWidget(parent), ui{std::make_unique<Ui::ConfigurePerGameAddons>()}, system{system_} {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <fmt/ranges.h>
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
#include "configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
#include "hid_core/frontend/emulated_controller.h"
|
#include "hid_core/frontend/emulated_controller.h"
|
||||||
#include "hid_core/hid_core.h"
|
#include "hid_core/hid_core.h"
|
||||||
#include "input_common/drivers/keyboard.h"
|
#include "input_common/drivers/keyboard.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "ui_configure_tas.h"
|
#include "ui_configure_tas.h"
|
||||||
#include "yuzu/configuration/configure_tas.h"
|
#include "yuzu/configuration/configure_tas.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
||||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigureTas>()) {
|
: QDialog(parent), ui(std::make_unique<Ui::ConfigureTas>()) {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/frontend/framebuffer_layout.h"
|
#include "core/frontend/framebuffer_layout.h"
|
||||||
#include "ui_configure_ui.h"
|
#include "ui_configure_ui.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
constexpr std::array default_game_icon_sizes{
|
constexpr std::array default_game_icon_sizes{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "ui_configure_web.h"
|
#include "ui_configure_web.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
ConfigureWeb::ConfigureWeb(QWidget* parent)
|
ConfigureWeb::ConfigureWeb(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class System;
|
class System;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "common/settings_common.h"
|
#include "common/settings_common.h"
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
|
|
||||||
namespace ConfigurationShared {
|
namespace ConfigurationShared {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <QStringLiteral>
|
#include <QStringLiteral>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <qobjectdefs.h>
|
#include <qobjectdefs.h>
|
||||||
#include "yuzu/configuration/shared_translation.h"
|
#include "qt_common/shared_translation.h"
|
||||||
|
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
#include "yuzu/debugger/console.h"
|
#include "yuzu/debugger/console.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
void ToggleConsole() {
|
void ToggleConsole() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <fmt/ranges.h>
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
#include "yuzu/debugger/wait_tree.h"
|
#include "yuzu/debugger/wait_tree.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
#include "core/arm/debug.h"
|
#include "core/arm/debug.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "yuzu/game_list_p.h"
|
#include "yuzu/game_list_p.h"
|
||||||
#include "yuzu/game_list_worker.h"
|
#include "yuzu/game_list_worker.h"
|
||||||
#include "yuzu/main.h"
|
#include "yuzu/main.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/controller_navigation.h"
|
#include "yuzu/util/controller_navigation.h"
|
||||||
|
|
||||||
GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent)
|
GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent)
|
||||||
|
@ -820,7 +820,7 @@ QStandardItemModel* GameList::GetModel() const {
|
||||||
return item_model;
|
return item_model;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs, const bool cached)
|
void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs)
|
||||||
{
|
{
|
||||||
tree_view->setEnabled(false);
|
tree_view->setEnabled(false);
|
||||||
|
|
||||||
|
@ -843,8 +843,7 @@ void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs, const bool
|
||||||
game_dirs,
|
game_dirs,
|
||||||
compatibility_list,
|
compatibility_list,
|
||||||
play_time_manager,
|
play_time_manager,
|
||||||
system,
|
system);
|
||||||
cached);
|
|
||||||
|
|
||||||
// Get events from the worker as data becomes available
|
// Get events from the worker as data becomes available
|
||||||
connect(current_worker.get(), &GameListWorker::DataAvailable, this, &GameList::WorkerEvent,
|
connect(current_worker.get(), &GameListWorker::DataAvailable, this, &GameList::WorkerEvent,
|
||||||
|
@ -873,14 +872,6 @@ const QStringList GameList::supported_file_extensions = {
|
||||||
QStringLiteral("nso"), QStringLiteral("nro"), QStringLiteral("nca"),
|
QStringLiteral("nso"), QStringLiteral("nro"), QStringLiteral("nca"),
|
||||||
QStringLiteral("xci"), QStringLiteral("nsp"), QStringLiteral("kip")};
|
QStringLiteral("xci"), QStringLiteral("nsp"), QStringLiteral("kip")};
|
||||||
|
|
||||||
void GameList::ForceRefreshGameDirectory()
|
|
||||||
{
|
|
||||||
if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) {
|
|
||||||
LOG_INFO(Frontend, "Force-reloading game list per user request.");
|
|
||||||
PopulateAsync(UISettings::values.game_dirs, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GameList::RefreshGameDirectory()
|
void GameList::RefreshGameDirectory()
|
||||||
{
|
{
|
||||||
if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) {
|
if (!UISettings::values.game_dirs.empty() && current_worker != nullptr) {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/compatibility_list.h"
|
#include "yuzu/compatibility_list.h"
|
||||||
#include "yuzu/play_time_manager.h"
|
#include "yuzu/play_time_manager.h"
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public:
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
|
|
||||||
void LoadCompatibilityList();
|
void LoadCompatibilityList();
|
||||||
void PopulateAsync(QVector<UISettings::GameDir>& game_dirs, const bool cached = true);
|
void PopulateAsync(QVector<UISettings::GameDir>& game_dirs);
|
||||||
|
|
||||||
void SaveInterfaceLayout();
|
void SaveInterfaceLayout();
|
||||||
void LoadInterfaceLayout();
|
void LoadInterfaceLayout();
|
||||||
|
@ -110,7 +110,6 @@ public:
|
||||||
static const QStringList supported_file_extensions;
|
static const QStringList supported_file_extensions;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void ForceRefreshGameDirectory();
|
|
||||||
void RefreshGameDirectory();
|
void RefreshGameDirectory();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "yuzu/play_time_manager.h"
|
#include "yuzu/play_time_manager.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/util.h"
|
#include "yuzu/util/util.h"
|
||||||
|
|
||||||
enum class GameListItemType {
|
enum class GameListItemType {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "yuzu/game_list.h"
|
#include "yuzu/game_list.h"
|
||||||
#include "yuzu/game_list_p.h"
|
#include "yuzu/game_list_p.h"
|
||||||
#include "yuzu/game_list_worker.h"
|
#include "yuzu/game_list_worker.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -199,8 +199,7 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path,
|
||||||
u64 program_id,
|
u64 program_id,
|
||||||
const CompatibilityList& compatibility_list,
|
const CompatibilityList& compatibility_list,
|
||||||
const PlayTime::PlayTimeManager& play_time_manager,
|
const PlayTime::PlayTimeManager& play_time_manager,
|
||||||
const FileSys::PatchManager& patch,
|
const FileSys::PatchManager& patch)
|
||||||
const bool cached)
|
|
||||||
{
|
{
|
||||||
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
||||||
|
|
||||||
|
@ -224,14 +223,10 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path,
|
||||||
|
|
||||||
QString patch_versions;
|
QString patch_versions;
|
||||||
|
|
||||||
if (cached) {
|
patch_versions = GetGameListCachedObject(
|
||||||
patch_versions = GetGameListCachedObject(
|
fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
|
||||||
fmt::format("{:016X}", patch.GetTitleID()), "pv.txt", [&patch, &loader] {
|
return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
|
||||||
return FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
patch_versions = FormatPatchNameVersions(patch, loader, loader.IsRomFSUpdatable());
|
|
||||||
}
|
|
||||||
|
|
||||||
list.insert(2, new GameListItem(patch_versions));
|
list.insert(2, new GameListItem(patch_versions));
|
||||||
|
|
||||||
|
@ -244,15 +239,13 @@ GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs_,
|
||||||
QVector<UISettings::GameDir>& game_dirs_,
|
QVector<UISettings::GameDir>& game_dirs_,
|
||||||
const CompatibilityList& compatibility_list_,
|
const CompatibilityList& compatibility_list_,
|
||||||
const PlayTime::PlayTimeManager& play_time_manager_,
|
const PlayTime::PlayTimeManager& play_time_manager_,
|
||||||
Core::System& system_,
|
Core::System& system_)
|
||||||
const bool cached_)
|
|
||||||
: vfs{std::move(vfs_)}
|
: vfs{std::move(vfs_)}
|
||||||
, provider{provider_}
|
, provider{provider_}
|
||||||
, game_dirs{game_dirs_}
|
, game_dirs{game_dirs_}
|
||||||
, compatibility_list{compatibility_list_}
|
, compatibility_list{compatibility_list_}
|
||||||
, play_time_manager{play_time_manager_}
|
, play_time_manager{play_time_manager_}
|
||||||
, system{system_}
|
, system{system_}
|
||||||
, cached{cached_}
|
|
||||||
{
|
{
|
||||||
// We want the game list to manage our lifetime.
|
// We want the game list to manage our lifetime.
|
||||||
setAutoDelete(false);
|
setAutoDelete(false);
|
||||||
|
@ -355,8 +348,7 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) {
|
||||||
program_id,
|
program_id,
|
||||||
compatibility_list,
|
compatibility_list,
|
||||||
play_time_manager,
|
play_time_manager,
|
||||||
patch,
|
patch);
|
||||||
cached);
|
|
||||||
RecordEvent([=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
RecordEvent([=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,8 +431,7 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
||||||
id,
|
id,
|
||||||
compatibility_list,
|
compatibility_list,
|
||||||
play_time_manager,
|
play_time_manager,
|
||||||
patch,
|
patch);
|
||||||
cached);
|
|
||||||
|
|
||||||
RecordEvent(
|
RecordEvent(
|
||||||
[=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
[=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
||||||
|
@ -463,8 +454,7 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
||||||
program_id,
|
program_id,
|
||||||
compatibility_list,
|
compatibility_list,
|
||||||
play_time_manager,
|
play_time_manager,
|
||||||
patch,
|
patch);
|
||||||
cached);
|
|
||||||
|
|
||||||
RecordEvent(
|
RecordEvent(
|
||||||
[=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
[=](GameList* game_list) { game_list->AddEntry(entry, parent_dir); });
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include "common/thread.h"
|
#include "common/thread.h"
|
||||||
#include "core/file_sys/registered_cache.h"
|
#include "core/file_sys/registered_cache.h"
|
||||||
#include "uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/compatibility_list.h"
|
#include "yuzu/compatibility_list.h"
|
||||||
#include "yuzu/play_time_manager.h"
|
#include "yuzu/play_time_manager.h"
|
||||||
|
|
||||||
|
@ -45,8 +45,7 @@ public:
|
||||||
QVector<UISettings::GameDir>& game_dirs_,
|
QVector<UISettings::GameDir>& game_dirs_,
|
||||||
const CompatibilityList& compatibility_list_,
|
const CompatibilityList& compatibility_list_,
|
||||||
const PlayTime::PlayTimeManager& play_time_manager_,
|
const PlayTime::PlayTimeManager& play_time_manager_,
|
||||||
Core::System& system_,
|
Core::System& system_);
|
||||||
const bool cached = true);
|
|
||||||
~GameListWorker() override;
|
~GameListWorker() override;
|
||||||
|
|
||||||
/// Starts the processing of directory tree information.
|
/// Starts the processing of directory tree information.
|
||||||
|
@ -95,6 +94,4 @@ private:
|
||||||
Common::Event processing_completed;
|
Common::Event processing_completed;
|
||||||
|
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
|
|
||||||
const bool cached;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "hid_core/frontend/emulated_controller.h"
|
#include "hid_core/frontend/emulated_controller.h"
|
||||||
#include "yuzu/hotkeys.h"
|
#include "yuzu/hotkeys.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
HotkeyRegistry::HotkeyRegistry() = default;
|
HotkeyRegistry::HotkeyRegistry() = default;
|
||||||
HotkeyRegistry::~HotkeyRegistry() = default;
|
HotkeyRegistry::~HotkeyRegistry() = default;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include "yuzu/install_dialog.h"
|
#include "yuzu/install_dialog.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialog(parent) {
|
InstallDialog::InstallDialog(QWidget* parent, const QStringList& files) : QDialog(parent) {
|
||||||
file_list = new QListWidget(this);
|
file_list = new QListWidget(this);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "core/loader/nca.h"
|
#include "core/loader/nca.h"
|
||||||
#include "core/tools/renderdoc.h"
|
#include "core/tools/renderdoc.h"
|
||||||
#include "frontend_common/firmware_manager.h"
|
#include "frontend_common/firmware_manager.h"
|
||||||
|
#include "qt_common/qt_common.h"
|
||||||
|
|
||||||
#include <JlCompress.h>
|
#include <JlCompress.h>
|
||||||
|
|
||||||
|
@ -156,7 +157,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||||
#include "yuzu/compatibility_list.h"
|
#include "yuzu/compatibility_list.h"
|
||||||
#include "yuzu/configuration/configure_dialog.h"
|
#include "yuzu/configuration/configure_dialog.h"
|
||||||
#include "yuzu/configuration/configure_input_per_game.h"
|
#include "yuzu/configuration/configure_input_per_game.h"
|
||||||
#include "yuzu/configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
#include "yuzu/debugger/console.h"
|
#include "yuzu/debugger/console.h"
|
||||||
#include "yuzu/debugger/controller.h"
|
#include "yuzu/debugger/controller.h"
|
||||||
#include "yuzu/debugger/wait_tree.h"
|
#include "yuzu/debugger/wait_tree.h"
|
||||||
|
@ -170,7 +171,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||||
#include "yuzu/main.h"
|
#include "yuzu/main.h"
|
||||||
#include "yuzu/play_time_manager.h"
|
#include "yuzu/play_time_manager.h"
|
||||||
#include "yuzu/startup_checks.h"
|
#include "yuzu/startup_checks.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/clickable_label.h"
|
#include "yuzu/util/clickable_label.h"
|
||||||
#include "yuzu/vk_device_info.h"
|
#include "yuzu/vk_device_info.h"
|
||||||
|
|
||||||
|
@ -559,7 +560,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
|
||||||
|
|
||||||
game_list->LoadCompatibilityList();
|
game_list->LoadCompatibilityList();
|
||||||
// force reload on first load to ensure add-ons get updated
|
// force reload on first load to ensure add-ons get updated
|
||||||
game_list->PopulateAsync(UISettings::values.game_dirs, false);
|
game_list->PopulateAsync(UISettings::values.game_dirs);
|
||||||
|
|
||||||
// make sure menubar has the arrow cursor instead of inheriting from this
|
// make sure menubar has the arrow cursor instead of inheriting from this
|
||||||
ui->menubar->setCursor(QCursor());
|
ui->menubar->setCursor(QCursor());
|
||||||
|
@ -4609,9 +4610,11 @@ void GMainWindow::OnToggleStatusBar() {
|
||||||
statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
|
statusBar()->setVisible(ui->action_Show_Status_Bar->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnGameListRefresh() {
|
void GMainWindow::OnGameListRefresh()
|
||||||
// force reload add-ons etc
|
{
|
||||||
game_list->ForceRefreshGameDirectory();
|
// Resets metadata cache and reloads
|
||||||
|
QtCommon::ResetMetadata();
|
||||||
|
game_list->RefreshGameDirectory();
|
||||||
SetFirmwareVersion();
|
SetFirmwareVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4620,7 +4623,7 @@ void GMainWindow::OnAlbum() {
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
if (!bis_system) {
|
if (!bis_system) {
|
||||||
QMessageBox::warning(this, tr("No firmware available"),
|
QMessageBox::warning(this, tr("No firmware available"),
|
||||||
tr("Please install the firmware to use the Album applet."));
|
tr("Please install firmware to use the Album applet."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4643,7 +4646,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
if (!bis_system) {
|
if (!bis_system) {
|
||||||
QMessageBox::warning(this, tr("No firmware available"),
|
QMessageBox::warning(this, tr("No firmware available"),
|
||||||
tr("Please install the firmware to use the Cabinet applet."));
|
tr("Please install firmware to use the Cabinet applet."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4667,7 +4670,7 @@ void GMainWindow::OnMiiEdit() {
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
if (!bis_system) {
|
if (!bis_system) {
|
||||||
QMessageBox::warning(this, tr("No firmware available"),
|
QMessageBox::warning(this, tr("No firmware available"),
|
||||||
tr("Please install the firmware to use the Mii editor."));
|
tr("Please install firmware to use the Mii editor."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4690,7 +4693,7 @@ void GMainWindow::OnOpenControllerMenu() {
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
if (!bis_system) {
|
if (!bis_system) {
|
||||||
QMessageBox::warning(this, tr("No firmware available"),
|
QMessageBox::warning(this, tr("No firmware available"),
|
||||||
tr("Please install the firmware to use the Controller Menu."));
|
tr("Please install firmware to use the Controller Menu."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4745,6 +4748,8 @@ void GMainWindow::OnHomeMenu() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(crueter): So much of this crap is common to qt that I should just move it all tbh
|
||||||
|
|
||||||
constexpr u64 QLaunchId = static_cast<u64>(Service::AM::AppletProgramId::QLaunch);
|
constexpr u64 QLaunchId = static_cast<u64>(Service::AM::AppletProgramId::QLaunch);
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
|
|
||||||
|
@ -4767,7 +4772,7 @@ void GMainWindow::OnInitialSetup() {
|
||||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||||
if (!bis_system) {
|
if (!bis_system) {
|
||||||
QMessageBox::warning(this, tr("No firmware available"),
|
QMessageBox::warning(this, tr("No firmware available"),
|
||||||
tr("Please install the firmware to use Starter."));
|
tr("Please install firmware to use Starter."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "configuration/qt_config.h"
|
#include "qt_common/qt_config.h"
|
||||||
#include "frontend_common/content_manager.h"
|
#include "frontend_common/content_manager.h"
|
||||||
#include "input_common/drivers/tas_input.h"
|
#include "input_common/drivers/tas_input.h"
|
||||||
#include "user_data_migration.h"
|
#include "user_data_migration.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "yuzu/multiplayer/message.h"
|
#include "yuzu/multiplayer/message.h"
|
||||||
#include "yuzu/multiplayer/state.h"
|
#include "yuzu/multiplayer/state.h"
|
||||||
#include "yuzu/multiplayer/validation.h"
|
#include "yuzu/multiplayer/validation.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
|
|
||||||
enum class ConnectionType : u8 { TraversalServer, IP };
|
enum class ConnectionType : u8 { TraversalServer, IP };
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "yuzu/multiplayer/message.h"
|
#include "yuzu/multiplayer/message.h"
|
||||||
#include "yuzu/multiplayer/state.h"
|
#include "yuzu/multiplayer/state.h"
|
||||||
#include "yuzu/multiplayer/validation.h"
|
#include "yuzu/multiplayer/validation.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
#include "web_service/verify_user_jwt.h"
|
#include "web_service/verify_user_jwt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "yuzu/multiplayer/message.h"
|
#include "yuzu/multiplayer/message.h"
|
||||||
#include "yuzu/multiplayer/state.h"
|
#include "yuzu/multiplayer/state.h"
|
||||||
#include "yuzu/multiplayer/validation.h"
|
#include "yuzu/multiplayer/validation.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
#include "web_service/web_backend.h"
|
#include "web_service/web_backend.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "yuzu/multiplayer/lobby.h"
|
#include "yuzu/multiplayer/lobby.h"
|
||||||
#include "yuzu/multiplayer/message.h"
|
#include "yuzu/multiplayer/message.h"
|
||||||
#include "yuzu/multiplayer/state.h"
|
#include "yuzu/multiplayer/state.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "qt_common/uisettings.h"
|
||||||
#include "yuzu/util/clickable_label.h"
|
#include "yuzu/util/clickable_label.h"
|
||||||
|
|
||||||
MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model_,
|
MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model_,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/alignment.h"
|
|
||||||
#include "common/fs/file.h"
|
#include "common/fs/file.h"
|
||||||
#include "common/fs/fs.h"
|
#include "common/fs/fs.h"
|
||||||
#include "common/fs/path_util.h"
|
#include "common/fs/path_util.h"
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/polyfill_thread.h"
|
#include <common/polyfill_thread.h>
|
||||||
|
|
||||||
|
// TODO(crueter): Extract this into frontend_common
|
||||||
namespace Service::Account {
|
namespace Service::Account {
|
||||||
class ProfileManager;
|
class ProfileManager;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QWindow>
|
|
||||||
#include "core/frontend/emu_window.h"
|
|
||||||
|
|
||||||
namespace QtCommon {
|
|
||||||
|
|
||||||
Core::Frontend::WindowSystemType GetWindowSystemType();
|
|
||||||
|
|
||||||
Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow* window);
|
|
||||||
|
|
||||||
} // namespace QtCommon
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "yuzu/qt_common.h"
|
#include "qt_common/qt_common.h"
|
||||||
|
|
||||||
#include "common/dynamic_library.h"
|
#include "common/dynamic_library.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue