mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 02:30:05 +00:00
Merge pull request #159 from SeannyM/enable_log
Add support for disabling log from settings
This commit is contained in:
commit
80e9c02bd6
@ -5,6 +5,7 @@
|
||||
#include "common/common.h"
|
||||
#include "common/log_manager.h"
|
||||
|
||||
#include "core/settings.h"
|
||||
#include "core/system.h"
|
||||
#include "core/core.h"
|
||||
#include "core/loader/loader.h"
|
||||
@ -23,6 +24,9 @@ int __cdecl main(int argc, char **argv) {
|
||||
|
||||
Config config;
|
||||
|
||||
if (!Settings::values.enable_log)
|
||||
LogManager::Shutdown();
|
||||
|
||||
std::string boot_filename = argv[1];
|
||||
EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
|
||||
|
||||
|
@ -65,11 +65,16 @@ void Config::ReadData() {
|
||||
Settings::values.use_virtual_sd = glfw_config->GetBoolean("Data Storage", "use_virtual_sd", true);
|
||||
}
|
||||
|
||||
void Config::ReadMiscellaneous() {
|
||||
Settings::values.enable_log = glfw_config->GetBoolean("Miscellaneous", "enable_log", true);
|
||||
}
|
||||
|
||||
void Config::Reload() {
|
||||
LoadINI(glfw_config, glfw_config_loc.c_str(), DefaultINI::glfw_config_file);
|
||||
ReadControls();
|
||||
ReadCore();
|
||||
ReadData();
|
||||
ReadMiscellaneous();
|
||||
}
|
||||
|
||||
Config::~Config() {
|
||||
|
@ -18,6 +18,7 @@ class Config {
|
||||
void ReadControls();
|
||||
void ReadCore();
|
||||
void ReadData();
|
||||
void ReadMiscellaneous();
|
||||
public:
|
||||
Config();
|
||||
~Config();
|
||||
|
@ -32,6 +32,9 @@ gpu_refresh_rate = ## 60 (default)
|
||||
|
||||
[Data Storage]
|
||||
use_virtual_sd =
|
||||
|
||||
[Miscellaneous]
|
||||
enable_log =
|
||||
)";
|
||||
|
||||
}
|
||||
|
@ -91,16 +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() {
|
||||
|
@ -18,6 +18,9 @@ class Config {
|
||||
void SaveCore();
|
||||
void ReadData();
|
||||
void SaveData();
|
||||
|
||||
void ReadMiscellaneous();
|
||||
void SaveMiscellaneous();
|
||||
public:
|
||||
Config();
|
||||
~Config();
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "debugger/graphics.hxx"
|
||||
#include "debugger/graphics_cmdlists.hxx"
|
||||
|
||||
#include "core/settings.h"
|
||||
#include "core/system.h"
|
||||
#include "core/core.h"
|
||||
#include "core/loader/loader.h"
|
||||
@ -34,8 +35,12 @@
|
||||
GMainWindow::GMainWindow()
|
||||
{
|
||||
LogManager::Init();
|
||||
|
||||
Config config;
|
||||
|
||||
if (!Settings::values.enable_log)
|
||||
LogManager::Shutdown();
|
||||
|
||||
ui.setupUi(this);
|
||||
statusBar()->hide();
|
||||
|
||||
|
@ -32,6 +32,8 @@ struct Values {
|
||||
|
||||
// Data Storage
|
||||
bool use_virtual_sd;
|
||||
|
||||
bool enable_log;
|
||||
} extern values;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user