From 41f3c92c25e85222dcb62da59910eb0b9619b560 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 19 Aug 2014 19:41:29 -0700 Subject: [PATCH] Fixing build. --- src/xenia/cpu/xenon_memory.cc | 4 ++-- src/xenia/kernel/xboxkrnl_memory.cc | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/xenia/cpu/xenon_memory.cc b/src/xenia/cpu/xenon_memory.cc index 8382ac922..63f5cc6d7 100644 --- a/src/xenia/cpu/xenon_memory.cc +++ b/src/xenia/cpu/xenon_memory.cc @@ -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(mbi.AllocationBase - membase_); + mem_info->allocation_base = static_cast( + reinterpret_cast(mbi.AllocationBase) - membase_); mem_info->allocation_protect = mbi.AllocationProtect; mem_info->region_size = mbi.RegionSize; mem_info->state = mbi.State; diff --git a/src/xenia/kernel/xboxkrnl_memory.cc b/src/xenia/kernel/xboxkrnl_memory.cc index fcc958094..ffdc4c7b1 100644 --- a/src/xenia/kernel/xboxkrnl_memory.cc +++ b/src/xenia/kernel/xboxkrnl_memory.cc @@ -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( - reinterpret_cast(mem_info.BaseAddress) - membase); - memory_basic_information->allocation_base = static_cast( - reinterpret_cast(mem_info.AllocationBase) - membase); - memory_basic_information->allocation_protect = mem_info.AllocationProtect; + memory_basic_information->base_address = + static_cast(mem_info.base_address); + memory_basic_information->allocation_base = + static_cast(mem_info.allocation_base); + memory_basic_information->allocation_protect = mem_info.allocation_protect; memory_basic_information->region_size = - static_cast(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(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 =