From 164c3fa9cb48eeef7e2e1f6d55c360911db5be52 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi <18193363+elad335@users.noreply.github.com> Date: Mon, 20 May 2024 21:38:56 +0300 Subject: [PATCH] sys_tty: Reduce thread dump log spam Some games just log random errors. --- rpcs3/Emu/Cell/lv2/sys_tty.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_tty.cpp b/rpcs3/Emu/Cell/lv2/sys_tty.cpp index 5324efee80..dcc142b81a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_tty.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_tty.cpp @@ -128,14 +128,14 @@ error_code sys_tty_write([[maybe_unused]] ppu_thread& ppu, s32 ch, vm::cptr= 2u && ([&]() + if (msg.size() >= 2u && [&]() { static thread_local u64 last_write = 0; // Dump thread about every period which TTY was not being touched for about half a second const u64 current = get_system_time(); - return current - std::exchange(last_write, current) >= 3'000'000; - }() || warning)) + return current - std::exchange(last_write, current) >= (warning ? 500'000 : 3'000'000); + }()) { ppu_log.notice("\n%s", dump_useful_thread_info()); }