mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-08 09:09:46 +00:00
Logging option restored
This commit is contained in:
parent
5c84ad30a1
commit
e3fbfc4bda
1 changed files with 13 additions and 7 deletions
|
@ -5,16 +5,22 @@ class LogBase
|
||||||
bool m_logging;
|
bool m_logging;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LogBase()
|
|
||||||
: m_logging(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetLogging(bool value)
|
void SetLogging(bool value)
|
||||||
{
|
{
|
||||||
m_logging = value;
|
m_logging = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetLogging()
|
||||||
|
{
|
||||||
|
//return m_logging; // TODO
|
||||||
|
return Ini.HLELogging.GetValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
LogBase()
|
||||||
|
{
|
||||||
|
SetLogging(false);
|
||||||
|
}
|
||||||
|
|
||||||
virtual const std::string& GetName() const = 0;
|
virtual const std::string& GetName() const = 0;
|
||||||
|
|
||||||
template<typename... Targs> void Notice(const u32 id, const char* fmt, Targs... args)
|
template<typename... Targs> void Notice(const u32 id, const char* fmt, Targs... args)
|
||||||
|
@ -29,7 +35,7 @@ public:
|
||||||
|
|
||||||
template<typename... Targs> __forceinline void Log(const char* fmt, Targs... args)
|
template<typename... Targs> __forceinline void Log(const char* fmt, Targs... args)
|
||||||
{
|
{
|
||||||
if (m_logging)
|
if (GetLogging())
|
||||||
{
|
{
|
||||||
Notice(fmt, args...);
|
Notice(fmt, args...);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +43,7 @@ public:
|
||||||
|
|
||||||
template<typename... Targs> __forceinline void Log(const u32 id, const char* fmt, Targs... args)
|
template<typename... Targs> __forceinline void Log(const u32 id, const char* fmt, Targs... args)
|
||||||
{
|
{
|
||||||
if (m_logging)
|
if (GetLogging())
|
||||||
{
|
{
|
||||||
Notice(id, fmt, args...);
|
Notice(id, fmt, args...);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue