From bc852aebeb9852801329f9576b4d5e3fa7df2efa Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 23 Jan 2024 15:56:11 +0100 Subject: Added a new option BOX64_MMAP32 to use 32bits mapping on external MMAP (help Snapdragon device running Vulkan with Wine/Wow64, active by default on SD845/SD888/SD8G2 profiles) --- src/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index a17e3eb8..7be65580 100644 --- a/src/main.c +++ b/src/main.c @@ -51,6 +51,11 @@ int box64_inprocessgpu = 0; int box64_malloc_hack = 0; int box64_dynarec_test = 0; int box64_maxcpu = 0; +#if defined(SD845) || defined(SD888) || defined(SD8G2) +int box64_mmap32 = 1; +#else +int box64_mmap32 = 0; +#endif #ifdef DYNAREC int box64_dynarec = 1; int box64_dynarec_dump = 0; @@ -964,6 +969,17 @@ void LoadLogEnv() printf_log(LOG_NONE, "Will not limit the number of cpu cores exposed\n"); } } + p = getenv("BOX64_MMAP32"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='0'+1) + box64_mmap32 = p[0]-'0'; + } + if(box64_mmap32) + printf_log(LOG_INFO, "Will use 32bits address in priority for external MMAP (when 32bits process are detected)\n"); + else + printf_log(LOG_INFO, "Will not use 32bits address in priority for external MMAP (when 32bits process are detected)\n"); + } box64_pagesize = sysconf(_SC_PAGESIZE); if(!box64_pagesize) box64_pagesize = 4096; -- cgit 1.4.1