[desktop] Port some QtCommon changes from QML branch (#3703)

- Linker now resolves implementation differences
- Remove unneeded ifdefs
- Better abstractions overall

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3703
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
crueter 2026-03-10 05:37:45 +01:00
parent 07e3a2aa46
commit 0ff1d215c8
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
36 changed files with 405 additions and 371 deletions

View file

@ -3,19 +3,14 @@
#include "qt_common.h"
#include "common/fs/fs.h"
#include "common/fs/ryujinx_compat.h"
#include <QGuiApplication>
#include <QStringLiteral>
#include "common/logging/log.h"
#include "core/frontend/emu_window.h"
#include "qt_common/abstract/frontend.h"
#include "qt_common/qt_string_lookup.h"
#include <QFile>
#include <QMessageBox>
#include <JlCompress.h>
#if !defined(WIN32) && !defined(__APPLE__)
@ -27,11 +22,7 @@
namespace QtCommon {
#ifdef YUZU_QT_WIDGETS
QWidget* rootObject = nullptr;
#else
QObject* rootObject = nullptr;
#endif
std::unique_ptr<Core::System> system = nullptr;
std::shared_ptr<FileSys::RealVfsFilesystem> vfs = nullptr;
@ -118,11 +109,7 @@ const QString tr(const std::string& str)
return QGuiApplication::tr(str.c_str());
}
#ifdef YUZU_QT_WIDGETS
void Init(QWidget* root)
#else
void Init(QObject* root)
#endif
{
system = std::make_unique<Core::System>();
rootObject = root;