Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Merge pull request #159 from SeannyM/enable_log

Tony Wasserka80e9c02bd6ec
diff --cc src/citra/config.cpp
index c5ce8a1647,65edcfc9fc..f45d09fc2c
--- a/src/citra/config.cpp
+++ b/src/citra/config.cpp
@@@ -68,8 -66,8 +72,9 @@@ void Config::ReadMiscellaneous()
void Config::Reload() {
LoadINI(glfw_config, glfw_config_loc.c_str(), DefaultINI::glfw_config_file);
ReadControls();
+ ReadCore();
ReadData();
+ ReadMiscellaneous();
}
Config::~Config() {
diff --cc src/citra/config.h
index 4f65518765,63b5978e25..19bb837004
--- a/src/citra/config.h
+++ b/src/citra/config.h
@@@ -16,8 -16,8 +16,9 @@@ class Config
bool LoadINI(INIReader* config, const char* location, const std::string& default_contents="", bool retry=true);
void ReadControls();
+ void ReadCore();
void ReadData();
+ void ReadMiscellaneous();
public:
Config();
~Config();
diff --cc src/citra/default_ini.h
index 557da881b1,1f0b6cad4d..f1f626eed0
--- a/src/citra/default_ini.h
+++ b/src/citra/default_ini.h
@@@ -26,12 -26,11 +26,15 @@@ pad_sdown
pad_sleft =
pad_sright =
+[Core]
+cpu_core = ## 0: Interpreter (default), 1: FastInterpreter (experimental)
+gpu_refresh_rate = ## 60 (default)
+
[Data Storage]
use_virtual_sd =
+
+ [Miscellaneous]
+ enable_log =
)";
}
diff --cc src/citra_qt/config.cpp
index 63d3964394,0ebc15f13d..09fce4d6fc
--- a/src/citra_qt/config.cpp
+++ b/src/citra_qt/config.cpp
@@@ -91,16 -76,28 +91,30 @@@ void Config::SaveData()
qt_config->endGroup();
}
+ void Config::ReadMiscellaneous() {
+ qt_config->beginGroup("Miscellaneous");
+ Settings::values.enable_log = qt_config->value("enable_log", true).toBool();
+ qt_config->endGroup();
+ }
+
+ void Config::SaveMiscellaneous() {
+ qt_config->beginGroup("Miscellaneous");
+ qt_config->setValue("enable_log", Settings::values.enable_log);
+ qt_config->endGroup();
+ }
+
void Config::Reload() {
ReadControls();
+ ReadCore();
ReadData();
+ ReadMiscellaneous();
}
void Config::Save() {
SaveControls();
+ SaveCore();
SaveData();
+ SaveMiscellaneous();
}
Config::~Config() {
diff --cc src/citra_qt/config.h
index 782c262876,9799024674..8c6568cb2b
--- a/src/citra_qt/config.h
+++ b/src/citra_qt/config.h
@@@ -14,10 -14,12 +14,13 @@@ class Config
void ReadControls();
void SaveControls();
-
+ void ReadCore();
+ void SaveCore();
void ReadData();
void SaveData();
+
+ void ReadMiscellaneous();
+ void SaveMiscellaneous();
public:
Config();
~Config();
diff --cc src/core/settings.h
index 6a6265e186,77b2f02fc5..7e7a66b89b
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@@ -26,12 -25,9 +26,14 @@@ struct Values
int pad_sleft_key;
int pad_sright_key;
+ // Core
+ int cpu_core;
+ int gpu_refresh_rate;
+
+ // Data Storage
bool use_virtual_sd;
+
+ bool enable_log;
} extern values;
}