mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #7600 from spycrab/resource_pack
Implement resource packs
This commit is contained in:
@ -87,6 +87,7 @@
|
||||
#include "DolphinQt/QtUtils/RunOnObject.h"
|
||||
#include "DolphinQt/QtUtils/WindowActivationEventFilter.h"
|
||||
#include "DolphinQt/RenderWidget.h"
|
||||
#include "DolphinQt/ResourcePackManager.h"
|
||||
#include "DolphinQt/Resources.h"
|
||||
#include "DolphinQt/SearchBar.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
@ -99,6 +100,10 @@
|
||||
|
||||
#include "UICommon/DiscordPresence.h"
|
||||
#include "UICommon/GameFile.h"
|
||||
#include "UICommon/ResourcePack/Manager.h"
|
||||
#include "UICommon/ResourcePack/Manifest.h"
|
||||
#include "UICommon/ResourcePack/ResourcePack.h"
|
||||
|
||||
#include "UICommon/UICommon.h"
|
||||
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
@ -208,6 +213,21 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters) : QMainW
|
||||
// Restoring of window states can sometimes go wrong, resulting in widgets being visible when they
|
||||
// shouldn't be so we have to reapply all our rules afterwards.
|
||||
Settings::Instance().RefreshWidgetVisibility();
|
||||
|
||||
if (!ResourcePack::Init())
|
||||
QMessageBox::critical(this, tr("Error"), tr("Error occured while loading some texture packs"));
|
||||
|
||||
for (auto& pack : ResourcePack::GetPacks())
|
||||
{
|
||||
if (!pack.IsValid())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
tr("Invalid Pack %1 provided: %2")
|
||||
.arg(QString::fromStdString(pack.GetPath()))
|
||||
.arg(QString::fromStdString(pack.GetError())));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -393,6 +413,8 @@ void MainWindow::ConnectMenuBar()
|
||||
|
||||
// Tools
|
||||
connect(m_menu_bar, &MenuBar::ShowMemcardManager, this, &MainWindow::ShowMemcardManager);
|
||||
connect(m_menu_bar, &MenuBar::ShowResourcePackManager, this,
|
||||
&MainWindow::ShowResourcePackManager);
|
||||
connect(m_menu_bar, &MenuBar::ShowCheatsManager, this, &MainWindow::ShowCheatsManager);
|
||||
connect(m_menu_bar, &MenuBar::BootGameCubeIPL, this, &MainWindow::OnBootGameCubeIPL);
|
||||
connect(m_menu_bar, &MenuBar::ImportNANDBackup, this, &MainWindow::OnImportNANDBackup);
|
||||
@ -1556,6 +1578,13 @@ void MainWindow::ShowMemcardManager()
|
||||
manager.exec();
|
||||
}
|
||||
|
||||
void MainWindow::ShowResourcePackManager()
|
||||
{
|
||||
ResourcePackManager manager(this);
|
||||
|
||||
manager.exec();
|
||||
}
|
||||
|
||||
void MainWindow::ShowCheatsManager()
|
||||
{
|
||||
m_cheats_manager->show();
|
||||
|
Reference in New Issue
Block a user