diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-23 15:56:11 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-23 15:56:11 +0100 |
| commit | bc852aebeb9852801329f9576b4d5e3fa7df2efa (patch) | |
| tree | afa5f6e29bc226eb993b8d5972d533442734f42f /src/main.c | |
| parent | 89da530898fa08c23b59e3e3bf64f266f113e014 (diff) | |
| download | box64-bc852aebeb9852801329f9576b4d5e3fa7df2efa.tar.gz box64-bc852aebeb9852801329f9576b4d5e3fa7df2efa.zip | |
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)
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
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; |