Fixing build.

This commit is contained in:
Ben Vanik 2014-08-19 19:41:29 -07:00
parent b870914795
commit 41f3c92c25
2 changed files with 12 additions and 12 deletions

View File

@ -406,8 +406,8 @@ bool XenonMemory::QueryInformation(uint64_t base_address,
return false;
}
mem_info->base_address = base_address;
mem_info->allocation_base =
static_cast<uint64_t>(mbi.AllocationBase - membase_);
mem_info->allocation_base = static_cast<uint64_t>(
reinterpret_cast<uint8_t*>(mbi.AllocationBase) - membase_);
mem_info->allocation_protect = mbi.AllocationProtect;
mem_info->region_size = mbi.RegionSize;
mem_info->state = mbi.State;

View File

@ -158,7 +158,7 @@ SHIM_CALL NtQueryVirtualMemory_shim(PPCContext* ppc_state, KernelState* state) {
XELOGD("NtQueryVirtualMemory(%.8X, %.8X)", base_address,
memory_basic_information_ptr);
MEMORY_BASIC_INFORMATION mem_info;
alloy::AllocationInfo mem_info;
size_t result = state->memory()->QueryInformation(base_address, &mem_info);
if (!result) {
SHIM_SET_RETURN_32(X_STATUS_INVALID_PARAMETER);
@ -166,16 +166,16 @@ SHIM_CALL NtQueryVirtualMemory_shim(PPCContext* ppc_state, KernelState* state) {
}
auto membase = state->memory()->membase();
memory_basic_information->base_address = static_cast<uint32_t>(
reinterpret_cast<uint8_t*>(mem_info.BaseAddress) - membase);
memory_basic_information->allocation_base = static_cast<uint32_t>(
reinterpret_cast<uint8_t*>(mem_info.AllocationBase) - membase);
memory_basic_information->allocation_protect = mem_info.AllocationProtect;
memory_basic_information->base_address =
static_cast<uint32_t>(mem_info.base_address);
memory_basic_information->allocation_base =
static_cast<uint32_t>(mem_info.allocation_base);
memory_basic_information->allocation_protect = mem_info.allocation_protect;
memory_basic_information->region_size =
static_cast<uint32_t>(mem_info.RegionSize);
memory_basic_information->state = mem_info.State;
memory_basic_information->protect = mem_info.Protect;
memory_basic_information->type = mem_info.Type;
static_cast<uint32_t>(mem_info.region_size);
memory_basic_information->state = mem_info.state;
memory_basic_information->protect = mem_info.protect;
memory_basic_information->type = mem_info.type;
// TODO(benvanik): auto swap structure.
memory_basic_information->base_address =