Better handling of title workspace
This commit is contained in:
@@ -783,8 +783,16 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
||||
}
|
||||
// Grab the current title ID.
|
||||
xex2_opt_execution_info* info = nullptr;
|
||||
uint32_t workspace_address = 0;
|
||||
module->GetOptHeader(XEX_HEADER_EXECUTION_INFO, &info);
|
||||
|
||||
kernel_state_->memory()
|
||||
->LookupHeapByType(false, 0x1000)
|
||||
->Alloc(module->workspace_size(), 0x1000,
|
||||
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
||||
kMemoryProtectRead | kMemoryProtectWrite, false,
|
||||
&workspace_address);
|
||||
|
||||
if (!info) {
|
||||
title_id_ = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user