This commit is contained in:
microsoftv 2024-11-26 19:59:07 -05:00
parent 58e26d01a7
commit 85d3e5d5e0
3 changed files with 29 additions and 32 deletions

View File

@ -7,9 +7,7 @@
#include <atomic>
#include "common/types.h"
#include <memory>
#include <mutex>
#include <stddef.h>
#include <vector>
namespace Core::Loader {

View File

@ -43,8 +43,8 @@ s32 StackBufferClose(StackBuffer* stackBuffer, size_t* outTotalSize) {
return ORBIS_OK;
}
s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize, void** outBuffer,
u8 flags) {
s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize,
void** outBuffer, u8 flags) {
stackBuffer->top = outBuffer;
stackBuffer->base = bufferStart;
stackBuffer->size = (size_t)bufferStart;
@ -144,15 +144,14 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
}
if (hostBufferInfo->hostBufferSize < requiredBufferSize) {
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])", hostBufferInfo->hostBufferSize,
requiredBufferSize);
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])",
hostBufferInfo->hostBufferSize, requiredBufferSize);
return ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE;
}
// Setup
StackBufferOpen(&stackBuffer, hostBufferInfo->hostBuffer, hostBufferInfo->hostBufferSize,
&systemList,
optionFlags);
&systemList, optionFlags);
result = SystemSetupCore(&stackBuffer, option, &setupResult);
if (result < 0) {
@ -164,7 +163,7 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
// Copy buffer results
setupResult.bufferInfo = *hostBufferInfo;
setupResult.hostFree = hostFree;
//setupResult.extraSystemData =
// TODO
// setupResult.systemList = systemList;
OrbisNgs2Handle systemHandle = setupResult.systemHandle;