mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Only silence logging during gameplay
This commit is contained in:
parent
8d54ddf426
commit
4aec48c2ca
4 changed files with 13 additions and 6 deletions
|
@ -791,6 +791,9 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
||||||
return game_boot_result::still_running;
|
return game_boot_result::still_running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable logging
|
||||||
|
rpcs3::utils::configure_logs(true);
|
||||||
|
|
||||||
m_ar.reset();
|
m_ar.reset();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -2502,6 +2505,9 @@ extern bool try_lock_spu_threads_in_a_state_compatible_with_savestates(bool reve
|
||||||
|
|
||||||
void Emulator::Kill(bool allow_autoexit, bool savestate)
|
void Emulator::Kill(bool allow_autoexit, bool savestate)
|
||||||
{
|
{
|
||||||
|
// Enable logging
|
||||||
|
rpcs3::utils::configure_logs(true);
|
||||||
|
|
||||||
if (!IsStopped() && savestate && !try_lock_spu_threads_in_a_state_compatible_with_savestates())
|
if (!IsStopped() && savestate && !try_lock_spu_threads_in_a_state_compatible_with_savestates())
|
||||||
{
|
{
|
||||||
sys_log.error("Failed to savestate: failed to lock SPU threads execution.");
|
sys_log.error("Failed to savestate: failed to lock SPU threads execution.");
|
||||||
|
|
|
@ -38,17 +38,17 @@ namespace rpcs3::utils
|
||||||
return thread_count;
|
return thread_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void configure_logs()
|
void configure_logs(bool force_enable)
|
||||||
{
|
{
|
||||||
static bool was_silenced = false;
|
static bool was_silenced = false;
|
||||||
|
|
||||||
const bool silenced = g_cfg.misc.silence_all_logs.get();
|
const bool silenced = g_cfg.misc.silence_all_logs.get() && !force_enable;
|
||||||
|
|
||||||
if (silenced)
|
if (silenced)
|
||||||
{
|
{
|
||||||
if (!was_silenced)
|
if (!was_silenced)
|
||||||
{
|
{
|
||||||
sys_log.success("Disabling logging! Do not create issues on GitHub or on the forums while logging is disabled.");
|
sys_log.always()("Disabling logging! Do not create issues on GitHub or on the forums while logging is disabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
logs::silence();
|
logs::silence();
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace rpcs3::utils
|
||||||
{
|
{
|
||||||
u32 get_max_threads();
|
u32 get_max_threads();
|
||||||
|
|
||||||
void configure_logs();
|
void configure_logs(bool force_enable = false);
|
||||||
|
|
||||||
u32 check_user(const std::string& user);
|
u32 check_user(const std::string& user);
|
||||||
|
|
||||||
|
|
|
@ -79,10 +79,11 @@ void main_application::OnEmuSettingsChange()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rpcs3::utils::configure_logs();
|
|
||||||
|
|
||||||
if (!Emu.IsStopped())
|
if (!Emu.IsStopped())
|
||||||
{
|
{
|
||||||
|
// Change logging (only allowed during gameplay)
|
||||||
|
rpcs3::utils::configure_logs();
|
||||||
|
|
||||||
// Force audio provider
|
// Force audio provider
|
||||||
g_cfg.audio.provider.set(Emu.IsVsh() ? audio_provider::rsxaudio : audio_provider::cell_audio);
|
g_cfg.audio.provider.set(Emu.IsVsh() ? audio_provider::rsxaudio : audio_provider::cell_audio);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue