reuse part3

This commit is contained in:
georgemoralis 2024-02-24 17:51:26 +02:00
parent 8447f3e06d
commit 4ebd1641a5

View File

@ -27,7 +27,8 @@ void GenerateCodeFiles(
std::transform(lowModName.begin(), lowModName.end(), lowModName.begin(), ::tolower); std::transform(lowModName.begin(), lowModName.end(), lowModName.begin(), ::tolower);
std::string headerName(lowModName + ".h"); std::string headerName(lowModName + ".h");
std::string headerCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// " std::string headerCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// "
"SPDX-License-Identifier: GPL-2.0-or-later\n\n"); "SPDX-License-Identifier: GPL-2.0-or-later");
headerCode += "\n\n";
headerCode += "#pragma once\n\n#include \"library_common.h\" \n\n"; headerCode += "#pragma once\n\n#include \"library_common.h\" \n\n";
std::string trimmedName = moduleName; std::string trimmedName = moduleName;
if (moduleName.find("libSce") != std::string::npos) { if (moduleName.find("libSce") != std::string::npos) {
@ -57,7 +58,8 @@ void GenerateCodeFiles(
std::string sourceName(lowModName + ".cpp"); std::string sourceName(lowModName + ".cpp");
std::string sourceCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// " std::string sourceCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// "
"SPDX-License-Identifier: GPL-2.0-or-later\n\n"); "SPDX-License-Identifier: GPL-2.0-or-later");
sourceCode += "\n\n";
sourceCode += "// Generated By moduleGenerator\n#include \"" + headerName + sourceCode += "// Generated By moduleGenerator\n#include \"" + headerName +
"\"\n#include \"common/log.h\"\n#include \"error_codes.h\"\n\n"; "\"\n#include \"common/log.h\"\n#include \"error_codes.h\"\n\n";