mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 21:30:05 +00:00
common: Remove dependency from core
This commit is contained in:
parent
ba98bf058a
commit
9527bfffed
14 changed files with 105 additions and 96 deletions
|
@ -8,10 +8,13 @@
|
|||
#include "citra_qt/configuration/configure_dialog.h"
|
||||
#include "citra_qt/hotkeys.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "ui_configure.h"
|
||||
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, bool enable_web_config)
|
||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigureDialog>()), registry(registry) {
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, Core::System& system_,
|
||||
bool enable_web_config)
|
||||
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()}, registry{registry_},
|
||||
system{system_} {
|
||||
Settings::SetConfiguringGlobal(true);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
@ -68,7 +71,7 @@ void ConfigureDialog::ApplyConfiguration() {
|
|||
ui->webTab->ApplyConfiguration();
|
||||
ui->uiTab->ApplyConfiguration();
|
||||
ui->storageTab->ApplyConfiguration();
|
||||
Settings::Apply();
|
||||
system.ApplySettings();
|
||||
Settings::LogSettings();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,15 @@ namespace Ui {
|
|||
class ConfigureDialog;
|
||||
}
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
class ConfigureDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
||||
explicit ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, Core::System& system,
|
||||
bool enable_web_config = true);
|
||||
~ConfigureDialog() override;
|
||||
|
||||
|
@ -37,4 +41,5 @@ private:
|
|||
|
||||
std::unique_ptr<Ui::ConfigureDialog> ui;
|
||||
HotkeyRegistry& registry;
|
||||
Core::System& system;
|
||||
};
|
||||
|
|
|
@ -102,7 +102,7 @@ void ConfigurePerGame::ApplyConfiguration() {
|
|||
audio_tab->ApplyConfiguration();
|
||||
debug_tab->ApplyConfiguration();
|
||||
|
||||
Settings::Apply();
|
||||
system.ApplySettings();
|
||||
Settings::LogSettings();
|
||||
|
||||
game_config->Save();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue