Add support for disabling log from settings
This commit is contained in:
parent
ae311eb3ef
commit
371b61f3ea
8 changed files with 37 additions and 0 deletions
|
@ -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"
|
||||
|
@ -22,6 +23,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;
|
||||
|
|
|
@ -59,10 +59,15 @@ 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();
|
||||
ReadData();
|
||||
ReadMiscellaneous();
|
||||
}
|
||||
|
||||
Config::~Config() {
|
||||
|
|
|
@ -17,6 +17,7 @@ class Config {
|
|||
bool LoadINI(INIReader* config, const char* location, const std::string& default_contents="", bool retry=true);
|
||||
void ReadControls();
|
||||
void ReadData();
|
||||
void ReadMiscellaneous();
|
||||
public:
|
||||
Config();
|
||||
~Config();
|
||||
|
|
|
@ -28,6 +28,9 @@ pad_sright =
|
|||
|
||||
[Data Storage]
|
||||
use_virtual_sd =
|
||||
|
||||
[Miscellaneous]
|
||||
enable_log =
|
||||
)";
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue