diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-05-08 22:49:48 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-08 16:49:48 +0200 |
| commit | 78193c5f1acb4fd0311bbf96ed0f692016d6e350 (patch) | |
| tree | 974f5798255854d960be1f89209fe12ef93fb31c /src/tools/env.c | |
| parent | 51d2b73cd73cb362255820fe86503d90cdd3dcd0 (diff) | |
| download | box64-78193c5f1acb4fd0311bbf96ed0f692016d6e350.tar.gz box64-78193c5f1acb4fd0311bbf96ed0f692016d6e350.zip | |
[ENV] Refactored file-mapping handling (#2612)
* [ENV] Refactored file-mapping handling * fix
Diffstat (limited to 'src/tools/env.c')
| -rw-r--r-- | src/tools/env.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/env.c b/src/tools/env.c index c21a3687..16c4b194 100644 --- a/src/tools/env.c +++ b/src/tools/env.c @@ -13,6 +13,8 @@ #include "fileutils.h" #include "box64context.h" #include "rbtree.h" +#include "wine_tools.h" +#include "pe_tools.h" box64env_t box64env = { 0 }; @@ -614,6 +616,10 @@ void RecordEnvMappings(uintptr_t addr, size_t length, int fd) mapping_t* mapping = NULL; khint_t k = kh_get(mapping_entry, mapping_entries, lowercase_filename); if(k == kh_end(mapping_entries)) { + // First time we see this file + if (box64_wine && BOX64ENV(unityplayer)) DetectUnityPlayer(lowercase_filename+1); + if (box64_wine && BOX64ENV(dynarec_volatile_metadata)) ParseVolatileMetadata(fullname, (void*)addr); + mapping = box_calloc(1, sizeof(mapping_t)); mapping->filename = box_strdup(lowercase_filename); mapping->fullname = box_strdup(fullname); |