From 4458dac49ab4a27637f253aa3b8bfee4d301a07c Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Sat, 11 May 2019 22:35:17 +0200 Subject: [PATCH] Fixing some missing imports and a bug in pointer tracking. --- core/windows/win_vmem.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/windows/win_vmem.cpp b/core/windows/win_vmem.cpp index b1434b7e2..44d3deabc 100644 --- a/core/windows/win_vmem.cpp +++ b/core/windows/win_vmem.cpp @@ -3,6 +3,8 @@ #include #include +#include "hw/mem/_vmem.h" + // Implementation of the vmem related function for Windows platforms. // For now this probably does some assumptions on the CPU/platform. @@ -29,7 +31,7 @@ static char * base_alloc = NULL; // Plase read the POSIX implementation for more information. On Windows this is // rather straightforward. -VMemType vmem_platform_init(void *vmem_base_addr, void *sh4rcb_addr) { +VMemType vmem_platform_init(void **vmem_base_addr, void **sh4rcb_addr) { // Firt let's try to allocate the in-memory file mem_handle = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, RAM_SIZE_MAX + VRAM_SIZE_MAX + ARAM_SIZE_MAX, 0); @@ -38,8 +40,8 @@ VMemType vmem_platform_init(void *vmem_base_addr, void *sh4rcb_addr) { base_alloc = (char*)VirtualAlloc(0, memsize, MEM_RESERVE, PAGE_NOACCESS); // Calculate pointers now - sh4rcb_addr = &base_alloc[0]; - vmem_base_addr = &base_alloc[sizeof(Sh4RCB)]; + *sh4rcb_addr = &base_alloc[0]; + *vmem_base_addr = &base_alloc[sizeof(Sh4RCB)]; return MemType512MB; }