mirror of https://github.com/PCSX2/pcsx2.git
input-rec: Cleanup inputRec namespace
This commit is contained in:
parent
ee0ebe1c04
commit
90938b100c
|
@ -815,6 +815,7 @@ set(pcsx2RecordingSources
|
||||||
${rec_src}/InputRecordingFile.cpp
|
${rec_src}/InputRecordingFile.cpp
|
||||||
${rec_src}/NewRecordingFrame.cpp
|
${rec_src}/NewRecordingFrame.cpp
|
||||||
${rec_src}/PadData.cpp
|
${rec_src}/PadData.cpp
|
||||||
|
${rec_src}/Utilities/InputRecordingLogger.cpp
|
||||||
${rec_vp_src}/VirtualPad.cpp
|
${rec_vp_src}/VirtualPad.cpp
|
||||||
${rec_vp_src}/VirtualPadData.cpp
|
${rec_vp_src}/VirtualPadData.cpp
|
||||||
${rec_vp_src}/VirtualPadResources.cpp
|
${rec_vp_src}/VirtualPadResources.cpp
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
|
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||||
|
*
|
||||||
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
* ation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
* PURPOSE. See the GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||||
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "PrecompiledHeader.h"
|
||||||
|
|
||||||
|
#include "InputRecordingLogger.h"
|
||||||
|
|
||||||
|
namespace inputRec
|
||||||
|
{
|
||||||
|
void log(const std::string log)
|
||||||
|
{
|
||||||
|
if (log.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
recordingConLog(fmt::format("[REC]: {}\n", log));
|
||||||
|
|
||||||
|
// NOTE - Color is not currently used for OSD logs
|
||||||
|
if (GSosdLog)
|
||||||
|
GSosdLog(log.c_str(), wxGetApp().GetProgramLog()->GetRGBA(ConsoleColors::Color_StrongMagenta));
|
||||||
|
}
|
||||||
|
|
||||||
|
void consoleLog(const std::string log)
|
||||||
|
{
|
||||||
|
if (log.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
recordingConLog(fmt::format("[REC]: {}\n", log));
|
||||||
|
}
|
||||||
|
|
||||||
|
void consoleMultiLog(std::vector<std::string> logs)
|
||||||
|
{
|
||||||
|
std::string log;
|
||||||
|
for (std::string l : logs)
|
||||||
|
log.append(fmt::format("[REC]: {}\n", l));
|
||||||
|
|
||||||
|
recordingConLog(log);
|
||||||
|
}
|
||||||
|
} // namespace inputRec
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
* Copyright (C) 2002-2021 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -28,32 +28,7 @@
|
||||||
|
|
||||||
namespace inputRec
|
namespace inputRec
|
||||||
{
|
{
|
||||||
static void log(const std::string log)
|
extern void log(const std::string log);
|
||||||
{
|
extern void consoleLog(const std::string log);
|
||||||
if (log.empty())
|
extern void consoleMultiLog(std::vector<std::string> logs);
|
||||||
return;
|
|
||||||
|
|
||||||
recordingConLog(fmt::format("[REC]: {}\n", log));
|
|
||||||
|
|
||||||
// NOTE - Color is not currently used for OSD logs
|
|
||||||
if (GSosdLog)
|
|
||||||
GSosdLog(log.c_str(), wxGetApp().GetProgramLog()->GetRGBA(ConsoleColors::Color_StrongMagenta));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void consoleLog(const std::string log)
|
|
||||||
{
|
|
||||||
if (log.empty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
recordingConLog(fmt::format("[REC]: {}\n", log));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void consoleMultiLog(std::vector<std::string> logs)
|
|
||||||
{
|
|
||||||
std::string log;
|
|
||||||
for (std::string l : logs)
|
|
||||||
log.append(fmt::format("[REC]: {}\n", l));
|
|
||||||
|
|
||||||
recordingConLog(log);
|
|
||||||
}
|
|
||||||
} // namespace inputRec
|
} // namespace inputRec
|
||||||
|
|
|
@ -331,6 +331,7 @@
|
||||||
<ClCompile Include="..\..\PAD\Windows\WindowsMouse.cpp" />
|
<ClCompile Include="..\..\PAD\Windows\WindowsMouse.cpp" />
|
||||||
<ClCompile Include="..\..\PAD\Windows\WndProcEater.cpp" />
|
<ClCompile Include="..\..\PAD\Windows\WndProcEater.cpp" />
|
||||||
<ClCompile Include="..\..\PAD\Windows\XInputEnum.cpp" />
|
<ClCompile Include="..\..\PAD\Windows\XInputEnum.cpp" />
|
||||||
|
<ClCompile Include="..\..\Recording\Utilities\InputRecordingLogger.cpp" />
|
||||||
<ClCompile Include="..\..\SPU2\DplIIdecoder.cpp" />
|
<ClCompile Include="..\..\SPU2\DplIIdecoder.cpp" />
|
||||||
<ClCompile Include="..\..\SPU2\debug.cpp" />
|
<ClCompile Include="..\..\SPU2\debug.cpp" />
|
||||||
<ClCompile Include="..\..\SPU2\RegLog.cpp" />
|
<ClCompile Include="..\..\SPU2\RegLog.cpp" />
|
||||||
|
|
|
@ -1309,6 +1309,9 @@
|
||||||
<ClCompile Include="..\..\CDVD\ChdFileReader.cpp">
|
<ClCompile Include="..\..\CDVD\ChdFileReader.cpp">
|
||||||
<Filter>System\ISO</Filter>
|
<Filter>System\ISO</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\Recording\Utilities\InputRecordingLogger.cpp">
|
||||||
|
<Filter>Recording\Utilities</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\Patch.h">
|
<ClInclude Include="..\..\Patch.h">
|
||||||
|
@ -2238,9 +2241,4 @@
|
||||||
<Filter>AppHost\Resources</Filter>
|
<Filter>AppHost\Resources</Filter>
|
||||||
</Manifest>
|
</Manifest>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Image Include="..\..\gui\Resources\NoIcon.png">
|
|
||||||
<Filter>AppHost\Resources</Filter>
|
|
||||||
</Image>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue