headless: Rename collectEmuLog for clarity.

This is still used when running tests outside headless, so leaving in
CoreParameter.
This commit is contained in:
Unknown W. Brackets 2023-03-26 10:21:07 -07:00
parent 76ef95a841
commit 00d84695d8
5 changed files with 9 additions and 5 deletions

View File

@ -61,7 +61,7 @@ struct CoreParameter {
std::string errorString;
bool startBreak;
std::string *collectEmuLog = nullptr;
std::string *collectDebugOutput = nullptr;
bool headLess; // Try to avoid messageboxes etc
// Internal PSP rendering resolution and scale factor.

View File

@ -2014,8 +2014,8 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o
std::string data(Memory::GetCharPointer(argAddr), argLen);
if (!System_SendDebugOutput(data))
DEBUG_LOG(SCEIO, "%s", data.c_str());
if (PSP_CoreParameter().collectEmuLog)
*PSP_CoreParameter().collectEmuLog += data;
if (PSP_CoreParameter().collectDebugOutput)
*PSP_CoreParameter().collectDebugOutput += data;
return 0;
}
case EMULATOR_DEVCTL__IS_EMULATOR:

View File

@ -1208,6 +1208,10 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
ptr = newptr;
magicPtr = (u32_le *)ptr;
int ret = pspDecryptPRX(in, (u8*)ptr, head->psp_size);
if (ret <= 0 && *(u32_le *)&ptr[0x150] == 0x464c457f) {
ret = head->psp_size - 0x150;
memcpy(newptr, in + 0x150, ret);
}
if (reportedModule) {
// This should happen for all "kernel" modules.
*error_string = "Missing key";

View File

@ -100,7 +100,7 @@ bool RunTests() {
coreParam.renderHeight = 272;
coreParam.pixelWidth = 480;
coreParam.pixelHeight = 272;
coreParam.collectEmuLog = &output;
coreParam.collectDebugOutput = &output;
coreParam.fastForward = true;
coreParam.updateRecent = false;

View File

@ -201,7 +201,7 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, const
std::string output;
if (opt.compare || opt.bench)
coreParameter.collectEmuLog = &output;
coreParameter.collectDebugOutput = &output;
std::string error_string;
if (!PSP_InitStart(coreParameter, &error_string)) {