input-rec: Cleanup inputRec namespace

This commit is contained in:
Tyler Wilding 2021-04-06 23:43:03 -04:00 committed by lightningterror
parent ee0ebe1c04
commit 90938b100c
5 changed files with 60 additions and 35 deletions

View File

@ -815,6 +815,7 @@ set(pcsx2RecordingSources
${rec_src}/InputRecordingFile.cpp
${rec_src}/NewRecordingFrame.cpp
${rec_src}/PadData.cpp
${rec_src}/Utilities/InputRecordingLogger.cpp
${rec_vp_src}/VirtualPad.cpp
${rec_vp_src}/VirtualPadData.cpp
${rec_vp_src}/VirtualPadResources.cpp

View File

@ -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

View File

@ -1,5 +1,5 @@
/* 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
* of the GNU Lesser General Public License as published by the Free Software Found-
@ -28,32 +28,7 @@
namespace inputRec
{
static 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));
}
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);
}
extern void log(const std::string log);
extern void consoleLog(const std::string log);
extern void consoleMultiLog(std::vector<std::string> logs);
} // namespace inputRec

View File

@ -331,6 +331,7 @@
<ClCompile Include="..\..\PAD\Windows\WindowsMouse.cpp" />
<ClCompile Include="..\..\PAD\Windows\WndProcEater.cpp" />
<ClCompile Include="..\..\PAD\Windows\XInputEnum.cpp" />
<ClCompile Include="..\..\Recording\Utilities\InputRecordingLogger.cpp" />
<ClCompile Include="..\..\SPU2\DplIIdecoder.cpp" />
<ClCompile Include="..\..\SPU2\debug.cpp" />
<ClCompile Include="..\..\SPU2\RegLog.cpp" />

View File

@ -1309,6 +1309,9 @@
<ClCompile Include="..\..\CDVD\ChdFileReader.cpp">
<Filter>System\ISO</Filter>
</ClCompile>
<ClCompile Include="..\..\Recording\Utilities\InputRecordingLogger.cpp">
<Filter>Recording\Utilities</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Patch.h">
@ -2238,9 +2241,4 @@
<Filter>AppHost\Resources</Filter>
</Manifest>
</ItemGroup>
<ItemGroup>
<Image Include="..\..\gui\Resources\NoIcon.png">
<Filter>AppHost\Resources</Filter>
</Image>
</ItemGroup>
</Project>