mirror of
https://github.com/ptitSeb/box64.git
synced 2024-11-23 06:30:22 +00:00
[RCFIEL] Add an option to force usage of native EGL/GLESv2 library
This commit is contained in:
parent
38cfeeb558
commit
c8d98f6901
@ -299,6 +299,11 @@ Box64 will prefer emulated libs first (except for glibc, alsa, pulse, GL, vulkan
|
||||
* 0 : Native libs are preferred (Default.)
|
||||
* 1 : Emulated libs are preferred (Default for program running inside pressure-vessel)
|
||||
|
||||
#### BOX64_WRAP_EGL *
|
||||
Box64 will prefer wrapped libs for EGL and GLESv2
|
||||
* 0 : Emulated libs are preferred (Default)
|
||||
* 1 : Native libs are preferred
|
||||
|
||||
#### BOX64_CRASHHANDLER *
|
||||
Box64 will use a dummy crashhandler.so library
|
||||
* 0 : Use Emulated crashhandler.so library if needed
|
||||
|
@ -159,6 +159,7 @@ int box64_x11glx = 1;
|
||||
int allow_missing_libs = 0;
|
||||
int box64_prefer_emulated = 0;
|
||||
int box64_prefer_wrapped = 0;
|
||||
int box64_wrap_egl = 0;
|
||||
int box64_sse_flushto0 = 0;
|
||||
int box64_x87_no80bits = 0;
|
||||
int box64_sync_rounding = 0;
|
||||
@ -1517,6 +1518,13 @@ void LoadEnvVars(box64context_t *context)
|
||||
printf_log(LOG_INFO, "BOX64: Prefering Emulated libs\n");
|
||||
}
|
||||
}
|
||||
if(getenv("BOX64_WRAP_EGL")) {
|
||||
char* p = getenv("BOX64_WRAP_EGL");
|
||||
if (*p>='0' && *p<='1') {
|
||||
box64_wrap_egl = *p - '0';
|
||||
if(box64_wrap_egl) printf_log(LOG_INFO, "BOX64: Prefering Native(Wrapped) EGL/GLESv2\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(getenv("BOX64_NOSIGSEGV")) {
|
||||
if (strcmp(getenv("BOX64_NOSIGSEGV"), "1")==0) {
|
||||
|
@ -429,10 +429,17 @@ static const char* essential_libs[] = {
|
||||
"libxkbcommon-x11.so.0", "libpulse-simple.so.0", "libpulse.so.0", "libvulkan.so.1", "libvulkan.so",
|
||||
"ld-linux-x86-64.so.2", "crashhandler.so", "libtcmalloc_minimal.so.0", "libtcmalloc_minimal.so.4", "libanl.so.1"
|
||||
};
|
||||
static const char* essential_libs_egl[] = {
|
||||
"libEGL.so", "libGLESv2.so"
|
||||
};
|
||||
static int isEssentialLib(const char* name) {
|
||||
for (unsigned int i=0; i<sizeof(essential_libs)/sizeof(essential_libs[0]); ++i)
|
||||
if(!strcmp(name, essential_libs[i]))
|
||||
return 1;
|
||||
if(box64_wrap_egl)
|
||||
for (unsigned int i=0; i<sizeof(essential_libs_egl)/sizeof(essential_libs_egl[0]); ++i)
|
||||
if(!strcmp(name, essential_libs_egl[i]))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,7 @@ ENTRYSTRING_(BOX64_EMULATED_LIBS, emulated_libs) \
|
||||
ENTRYBOOL(BOX64_ALLOWMISSINGLIBS, allow_missing_libs) \
|
||||
ENTRYBOOL(BOX64_PREFER_WRAPPED, box64_prefer_wrapped) \
|
||||
ENTRYBOOL(BOX64_PREFER_EMULATED, box64_prefer_emulated) \
|
||||
ENTRYBOOL(BOX64_WRAP_EGl, box64_wrap_egl) \
|
||||
ENTRYBOOL(BOX64_CRASHHANDLER, box64_dummy_crashhandler) \
|
||||
ENTRYBOOL(BOX64_NOPULSE, box64_nopulse) \
|
||||
ENTRYBOOL(BOX64_NOGTK, box64_nogtk) \
|
||||
|
Loading…
Reference in New Issue
Block a user