Only use lm service when LOGVISOR_NX_LM set

This commit is contained in:
Luke Street 2020-05-05 00:14:41 -04:00
parent 14ea54f8b5
commit 41432143fd
2 changed files with 7 additions and 2 deletions

View File

@ -12,6 +12,10 @@
#define FMT_ENFORCE_COMPILE_STRING 1
#include <fmt/format.h>
#if defined(__SWITCH__) && !defined(LOGVISOR_NX_LM)
#define LOGVISOR_NX_LM 0
#endif
extern "C" void logvisorBp();
namespace logvisor {

View File

@ -31,7 +31,7 @@
#include <unordered_map>
#include <cstdio>
#include <cinttypes>
#include <signal.h>
#include <csignal>
#include "logvisor/logvisor.hpp"
/* ANSI sequences */
@ -169,6 +169,7 @@ void KillProcessTree() {
#elif defined(__SWITCH__)
[[noreturn]] void logvisorAbort() {
MainLoggers.clear();
nvExit();
exit(1);
}
#else
@ -294,7 +295,7 @@ static inline int ConsoleWidth() {
return retval;
}
#ifdef __SWITCH__
#if LOGVISOR_NX_LM
struct ConsoleLogger : public ILogger {
Service m_svc{};