mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-12 22:14:58 +00:00
Compilation fix
This commit is contained in:
parent
7a466b7fb7
commit
52cf911c60
@ -150,8 +150,7 @@ public:
|
||||
{
|
||||
if (!Emu.IsStopped())
|
||||
{
|
||||
LOG_ERROR(HLE, "SMutexLockerBase: thread id == 0");
|
||||
Emu.Pause();
|
||||
assert(!"SMutexLockerBase: thread id == 0");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <unordered_map>
|
||||
#include <set>
|
||||
|
||||
#define rID_ANY -1 // was wxID_ANY
|
||||
|
||||
|
18
rpcs3/Emu/SysCalls/LogBase.cpp
Normal file
18
rpcs3/Emu/SysCalls/LogBase.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Log.h"
|
||||
#include "LogBase.h"
|
||||
|
||||
void LogBase::LogNotice(const std::string& text)
|
||||
{
|
||||
LOG_NOTICE(HLE, "%s", text.c_str());
|
||||
}
|
||||
|
||||
void LogBase::LogWarning(const std::string& text)
|
||||
{
|
||||
LOG_WARNING(HLE, "%s", text.c_str());
|
||||
}
|
||||
|
||||
void LogBase::LogError(const std::string& text)
|
||||
{
|
||||
LOG_ERROR(HLE, "%s", text.c_str());
|
||||
}
|
@ -4,18 +4,16 @@ class LogBase
|
||||
{
|
||||
bool m_logging;
|
||||
|
||||
void LogNotice(const std::string& text);
|
||||
void LogWarning(const std::string& text);
|
||||
void LogError(const std::string& text);
|
||||
|
||||
public:
|
||||
void SetLogging(bool value)
|
||||
{
|
||||
m_logging = value;
|
||||
}
|
||||
|
||||
bool GetLogging()
|
||||
{
|
||||
//return m_logging; // TODO
|
||||
return Ini.HLELogging.GetValue();
|
||||
}
|
||||
|
||||
LogBase()
|
||||
{
|
||||
SetLogging(false);
|
||||
@ -25,17 +23,17 @@ public:
|
||||
|
||||
template<typename... Targs> void Notice(const u32 id, const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_NOTICE(HLE, GetName() + fmt::Format("[%d]: ", id) + fmt::Format(fmt, args...));
|
||||
LogNotice(GetName() + fmt::Format("[%d]: ", id) + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Notice(const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_NOTICE(HLE, GetName() + ": " + fmt::Format(fmt, args...));
|
||||
LogNotice(GetName() + ": " + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> __forceinline void Log(const char* fmt, Targs... args)
|
||||
{
|
||||
if (GetLogging())
|
||||
if (m_logging)
|
||||
{
|
||||
Notice(fmt, args...);
|
||||
}
|
||||
@ -43,7 +41,7 @@ public:
|
||||
|
||||
template<typename... Targs> __forceinline void Log(const u32 id, const char* fmt, Targs... args)
|
||||
{
|
||||
if (GetLogging())
|
||||
if (m_logging)
|
||||
{
|
||||
Notice(id, fmt, args...);
|
||||
}
|
||||
@ -51,31 +49,31 @@ public:
|
||||
|
||||
template<typename... Targs> void Warning(const u32 id, const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_WARNING(HLE, GetName() + fmt::Format("[%d] warning: ", id) + fmt::Format(fmt, args...));
|
||||
LogWarning(GetName() + fmt::Format("[%d] warning: ", id) + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Warning(const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_WARNING(HLE, GetName() + " warning: " + fmt::Format(fmt, args...));
|
||||
LogWarning(GetName() + " warning: " + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Error(const u32 id, const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_ERROR(HLE, GetName() + fmt::Format("[%d] error: ", id) + fmt::Format(fmt, args...));
|
||||
LogError(GetName() + fmt::Format("[%d] error: ", id) + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Error(const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_ERROR(HLE, GetName() + " error: " + fmt::Format(fmt, args...));
|
||||
LogError(GetName() + " error: " + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Todo(const u32 id, const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_ERROR(HLE, GetName() + fmt::Format("[%d] TODO: ", id) + fmt::Format(fmt, args...));
|
||||
LogError(GetName() + fmt::Format("[%d] TODO: ", id) + fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> void Todo(const char* fmt, Targs... args)
|
||||
{
|
||||
LOG_ERROR(HLE, GetName() + " TODO: " + fmt::Format(fmt, args...));
|
||||
LogError(GetName() + " TODO: " + fmt::Format(fmt, args...));
|
||||
}
|
||||
};
|
@ -93,6 +93,7 @@
|
||||
<ClCompile Include="Emu\RSX\RSXThread.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Callback.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\FuncList.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\LogBase.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\lv2\lv2Fs.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\lv2\sys_cond.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\lv2\sys_event.cpp" />
|
||||
|
@ -605,6 +605,9 @@
|
||||
<ClCompile Include="..\Utilities\AutoPause.cpp">
|
||||
<Filter>Utilities</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\LogBase.cpp">
|
||||
<Filter>Emu\SysCalls</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Crypto\aes.h">
|
||||
@ -1155,7 +1158,7 @@
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellL10n.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\IdManager.h">
|
||||
<Filter>Emu</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
x
Reference in New Issue
Block a user