mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-01-31 00:55:19 +01:00
Update backend.cpp (#3900)
This commit is contained in:
@@ -98,6 +98,7 @@ private:
|
|||||||
std::size_t bytes_written = 0;
|
std::size_t bytes_written = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
/**
|
/**
|
||||||
* Backend that writes to Visual Studio's output window
|
* Backend that writes to Visual Studio's output window
|
||||||
*/
|
*/
|
||||||
@@ -108,15 +109,14 @@ public:
|
|||||||
~DebuggerBackend() = default;
|
~DebuggerBackend() = default;
|
||||||
|
|
||||||
void Write(const Entry& entry) {
|
void Write(const Entry& entry) {
|
||||||
#ifdef _WIN32
|
|
||||||
::OutputDebugStringW(UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str());
|
::OutputDebugStringW(UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Flush() {}
|
void Flush() {}
|
||||||
|
|
||||||
void EnableForStacktrace() {}
|
void EnableForStacktrace() {}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
bool initialization_in_progress_suppress_logging = true;
|
bool initialization_in_progress_suppress_logging = true;
|
||||||
|
|
||||||
@@ -268,7 +268,9 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ForEachBackend(auto lambda) {
|
void ForEachBackend(auto lambda) {
|
||||||
// lambda(debugger_backend);
|
#ifdef _WIN32
|
||||||
|
lambda(debugger_backend);
|
||||||
|
#endif
|
||||||
lambda(color_console_backend);
|
lambda(color_console_backend);
|
||||||
lambda(file_backend);
|
lambda(file_backend);
|
||||||
}
|
}
|
||||||
@@ -281,7 +283,9 @@ private:
|
|||||||
static inline bool should_append{false};
|
static inline bool should_append{false};
|
||||||
|
|
||||||
Filter filter;
|
Filter filter;
|
||||||
|
#ifdef _WIN32
|
||||||
DebuggerBackend debugger_backend{};
|
DebuggerBackend debugger_backend{};
|
||||||
|
#endif
|
||||||
ColorConsoleBackend color_console_backend{};
|
ColorConsoleBackend color_console_backend{};
|
||||||
FileBackend file_backend;
|
FileBackend file_backend;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user