From 20fbd263492d2bef2388745b54e91b0a55ef8f08 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 2 Mar 2019 21:32:29 +0200 Subject: [PATCH] set_direct_memory() available without JIT --- memory.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/memory.cpp b/memory.cpp index 7e75d23b..5314a2bd 100644 --- a/memory.cpp +++ b/memory.cpp @@ -1841,6 +1841,15 @@ err: return 0; } +static void set_direct_memory(addrbank *ab) +{ + if (!(ab->flags & ABFLAG_DIRECTACCESS)) + return; + ab->baseaddr_direct_r = ab->baseaddr; + if (!(ab->flags & ABFLAG_ROM)) + ab->baseaddr_direct_w = ab->baseaddr; +} + #ifndef NATMEM_OFFSET bool mapped_malloc (addrbank *ab) @@ -1849,6 +1858,7 @@ bool mapped_malloc (addrbank *ab) ab->baseaddr = xcalloc (uae_u8, ab->reserved_size + 4); ab->allocated_size = ab->baseaddr != NULL ? ab->reserved_size : 0; ab->flags &= ~ABFLAG_MAPPED; + set_direct_memory(ab); return ab->baseaddr != NULL; } @@ -1970,15 +1980,6 @@ static void add_shmmaps (uae_u32 start, addrbank *what) #define MAPPED_MALLOC_DEBUG 0 -static void set_direct_memory(addrbank *ab) -{ - if (!(ab->flags & ABFLAG_DIRECTACCESS)) - return; - ab->baseaddr_direct_r = ab->baseaddr; - if (!(ab->flags & ABFLAG_ROM)) - ab->baseaddr_direct_w = ab->baseaddr; -} - bool mapped_malloc (addrbank *ab) { int id; -- 2.47.3