mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
fix(venus): drop LIBGL_KOPPER_DISABLE without calling the guarded unsetenv (#2441)
This commit is contained in:
1 parent
8961d088f2
commit
a7bd6ed299
2 files changed
+74
-1
No files matched your search
@@ -12,7 +12,14 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
extern char **environ;
|
||||
|
||||
__attribute__((constructor)) static void bl_venus_keep_kopper(void) {
|
||||
static const char name[] = "LIBGL_KOPPER_DISABLE=";
|
||||
const char *debug = getenv("VN_DEBUG");
|
||||
if (debug && strstr(debug, "vtest")) unsetenv("LIBGL_KOPPER_DISABLE");
|
||||
if (!debug || !strstr(debug, "vtest") || !environ) return;
|
||||
char **out = environ;
|
||||
for (char **in = environ; *in; in++)
|
||||
if (strncmp(*in, name, sizeof name - 1)) *out++ = *in;
|
||||
*out = NULL;
|
||||
}
|
||||
Reference in new issue
Block a user