Add config to silence all logs

This commit is contained in:
Nekotekina 2020-02-01 07:14:26 +03:00
parent 943368912b
commit efafda2650
6 changed files with 20 additions and 0 deletions

View File

@ -1657,6 +1657,12 @@ void Emulator::Run()
m_pause_amend_time = 0;
m_state = system_state::running;
if (g_cfg.misc.silence_all_logs)
{
sys_log.notice("Now disabling logging...");
logs::silence();
}
auto on_select = [](u32, cpu_thread& cpu)
{
cpu.state -= cpu_flag::stop;

View File

@ -624,6 +624,7 @@ struct cfg_root : cfg::node
cfg::_bool show_shader_compilation_hint{ this, "Show shader compilation hint", true, true };
cfg::_bool use_native_interface{ this, "Use native user interface", true };
cfg::string gdb_server{this, "GDB Server", "127.0.0.1:2345"};
cfg::_bool silence_all_logs{this, "Silence All Logs", false, false};
} misc{this};

View File

@ -8,6 +8,7 @@
"liblv2": "This closely emulates how games can load and unload system module files on a real PlayStation 3.\nSome games require this.\nThis is the preferred option."
},
"debugConsoleMode": "Increases the amount of usable system memory to match a DECR console and more.\nCauses some software to behave differently than on retail hardware.",
"silenceAllLogs": "Stop writing any logs after game startup. Don't use unless you believe it's necessary.",
"readColor": "Initializes render target memory using vm memory.",
"readDepth": "Initializes render target memory using vm memory.",
"dumpDepth": "Writes depth buffer values to vm memory.",

View File

@ -46,6 +46,7 @@ public:
SPUBlockSize,
SPUCache,
DebugConsoleMode,
SilenceAllLogs,
MaxSPURSThreads,
SleepTimersAccuracy,
ClocksScale,
@ -368,6 +369,7 @@ private:
{ ShowWelcomeScreen, { "Miscellaneous", "Show Welcome Screen"}},
{ UseNativeInterface, { "Miscellaneous", "Use native user interface"}},
{ ShowShaderCompilationHint, { "Miscellaneous", "Show shader compilation hint"}},
{ SilenceAllLogs, { "Miscellaneous", "Silence All Logs" }},
// Networking
{ ConnectionStatus, { "Net", "Connection status"}},

View File

@ -920,6 +920,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xemu_settings->EnhanceCheckBox(ui->debugConsoleMode, emu_settings::DebugConsoleMode);
SubscribeTooltip(ui->debugConsoleMode, json_advanced["debugConsoleMode"].toString());
xemu_settings->EnhanceCheckBox(ui->silenceAllLogs, emu_settings::SilenceAllLogs);
SubscribeTooltip(ui->silenceAllLogs, json_advanced["silenceAllLogs"].toString());
xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers);
SubscribeTooltip(ui->readColor, json_advanced["readColor"].toString());

View File

@ -1582,6 +1582,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="silenceAllLogs">
<property name="text">
<string>Silence All Logs</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>