mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-30 21:07:06 +02:00
[desktop] More qt_common reorganization (#3916)
Ported from QML branch. Main "big" change is that EmuThread is now a shared state in QtCommon, not individually managed/passed around by GRenderWindow and MainWindow. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3916 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
300a646a34
commit
feb8c5f88e
44 changed files with 963 additions and 932 deletions
|
|
@ -36,7 +36,8 @@ void GameCard::paint(QPainter* painter, const QStyleOptionViewItem& option,
|
|||
const auto x_pos = option.rect.left() - (column * cell_width) + static_cast<int>(relative_x);
|
||||
|
||||
// also, add some additional padding here to prevent card overlap
|
||||
QRect cardRect(x_pos + 4, option.rect.top() + 4, fixed_card_width - 8, option.rect.height() - margins);
|
||||
QRect cardRect(x_pos + 4, option.rect.top() + 4, fixed_card_width - 8,
|
||||
option.rect.height() - margins);
|
||||
|
||||
// colors
|
||||
QPalette palette = option.palette;
|
||||
|
|
|
|||
|
|
@ -1113,10 +1113,6 @@ void GameList::LoadInterfaceLayout() {
|
|||
header->resizeSection(COLUMN_NAME, 840);
|
||||
}
|
||||
|
||||
const QStringList GameList::supported_file_extensions = {
|
||||
QStringLiteral("nso"), QStringLiteral("nro"), QStringLiteral("nca"),
|
||||
QStringLiteral("xci"), QStringLiteral("nsp"), QStringLiteral("kip")};
|
||||
|
||||
void GameList::RefreshGameDirectory() {
|
||||
// Reset the externals watcher whenever the game list is reloaded,
|
||||
// primarily ensures that new titles and external dirs are caught.
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@ public:
|
|||
/// Disables events from the emulated controller
|
||||
void UnloadController();
|
||||
|
||||
static const QStringList supported_file_extensions;
|
||||
|
||||
bool IsTreeMode();
|
||||
void ResetViewMode();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,17 +20,18 @@
|
|||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "core/file_sys/card_image.h"
|
||||
#include "core/file_sys/common_funcs.h"
|
||||
#include "core/file_sys/content_archive.h"
|
||||
#include "core/file_sys/control_metadata.h"
|
||||
#include "core/file_sys/fs_filesystem.h"
|
||||
#include "core/file_sys/nca_metadata.h"
|
||||
#include "core/file_sys/patch_manager.h"
|
||||
#include "core/file_sys/registered_cache.h"
|
||||
#include "core/file_sys/romfs.h"
|
||||
#include "core/file_sys/submission_package.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/qt_common.h"
|
||||
|
||||
#include "yuzu/compatibility_list.h"
|
||||
#include "yuzu/game/game_list.h"
|
||||
#include "yuzu/game/game_list_p.h"
|
||||
|
|
@ -148,7 +149,7 @@ void GetMetadataFromControlNCA(const FileSys::PatchManager& patch_manager, const
|
|||
|
||||
bool HasSupportedFileExtension(const std::string& file_name) {
|
||||
const QFileInfo file = QFileInfo(QString::fromStdString(file_name));
|
||||
return GameList::supported_file_extensions.contains(file.suffix(), Qt::CaseInsensitive);
|
||||
return QtCommon::supported_file_extensions.contains(file.suffix(), Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
bool IsExtractedNCAMain(const std::string& file_name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue