Skip to content

Commit

Permalink
Don't log "always" messages in fatal_error_listener
Browse files Browse the repository at this point in the history
Opening the console breaks Qt popups
  • Loading branch information
Megamouse committed Oct 25, 2024
1 parent 8421791 commit 153c93b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 4 additions & 2 deletions rpcs3/Emu/Cell/SPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4790,7 +4790,7 @@ bool spu_thread::process_mfc_cmd()
getllar_spin_count = 0;
getllar_busy_waiting_switch = umax;

u64 ntime;
u64 ntime = 0;
rsx::reservation_lock rsx_lock(addr, 128);

for (u64 i = 0; i != umax; [&]()
Expand Down Expand Up @@ -4896,7 +4896,7 @@ bool spu_thread::process_mfc_cmd()
// Avoid logging useless commands if there is no reservation
const bool dump = g_cfg.core.mfc_debug && raddr;

const bool is_spurs_task_wait = pc == 0x11e4 && spurs_addr != -0x80u;
const bool is_spurs_task_wait = pc == 0x11e4 && spurs_addr != 0u - 0x80u;

if (!is_spurs_task_wait || spurs_addr != raddr || spurs_waited)
{
Expand Down Expand Up @@ -5570,6 +5570,8 @@ s64 spu_thread::get_ch_value(u32 ch)

thread_ctrl::wait_on(state, old);
}

fmt::throw_exception("Unreachable"); // Fix unannotated fallthrough warning
}

case MFC_RdTagStat:
Expand Down
9 changes: 3 additions & 6 deletions rpcs3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ struct fatal_error_listener final : logs::listener

void log(u64 /*stamp*/, const logs::message& msg, const std::string& prefix, const std::string& text) override
{
if (msg <= logs::level::fatal)
if (msg == logs::level::fatal)
{
std::string _msg = "RPCS3: ";

Expand Down Expand Up @@ -288,11 +288,8 @@ struct fatal_error_listener final : logs::listener
OutputDebugStringA(_msg.c_str());
}
#endif
if (msg == logs::level::fatal)
{
// Pause emulation if fatal error encountered
Emu.Pause(true);
}
// Pause emulation if fatal error encountered
Emu.Pause(true);
}
}
};
Expand Down

0 comments on commit 153c93b

Please sign in to comment.