From 06d6ad09eadcd9e6faa9db3e376a541ac3d28025 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Mon, 1 Apr 2024 08:44:07 +0300 Subject: [PATCH] log debug message to tty --- src/common/logging/filter.cpp | 1 + src/common/logging/types.h | 1 + src/core/libraries/libkernel.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 0714362c..ac38ab0f 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -98,6 +98,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { CLS(Render) \ SUB(Render, Vulkan) \ CLS(Input) \ + CLS(Tty) \ CLS(Loader) // GetClassName is a macro defined by Windows.h, grrr... diff --git a/src/common/logging/types.h b/src/common/logging/types.h index 1d848d74..897929be 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -66,6 +66,7 @@ enum class Class : u8 { Render_Vulkan, ///< Vulkan backend Loader, ///< ROM loader Input, ///< Input emulation + Tty, ///< Debug output from emu Count ///< Total number of logging classes }; diff --git a/src/core/libraries/libkernel.cpp b/src/core/libraries/libkernel.cpp index 94b41a8e..5ce0bd00 100644 --- a/src/core/libraries/libkernel.cpp +++ b/src/core/libraries/libkernel.cpp @@ -466,7 +466,7 @@ s64 PS4_SYSV_ABI ps4__write(int d, const void* buf, std::size_t nbytes) { char* str = strdup((const char*)buf); if (str[nbytes - 1] == '\n') str[nbytes - 1] = 0; - LOG_INFO(Kernel, "{}", str); + LOG_INFO(Tty, "{}", str); free(str); return nbytes; }