mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
fix: keep SteamVR syscall hooks and report Steam crashes (#905)
* fix: preserve SteamVR syscall hooks * fix: report Steam crashes through gamescope
This commit is contained in:
1 parent
787cec2548
commit
d301148881
4 files changed
+162
No files matched your search
@@ -7,6 +7,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/uio.h>
|
||||
#include <unistd.h>
|
||||
@@ -25,8 +26,22 @@ struct bl_open_how {
|
||||
};
|
||||
|
||||
static long (*real_syscall)(long, ...);
|
||||
static void *(*real_dlopen)(const char *, int);
|
||||
static int openat2_missing;
|
||||
|
||||
void *dlopen(const char *filename, int flags) {
|
||||
if (!real_dlopen) {
|
||||
real_dlopen = (void *(*)(const char *, int))dlsym(RTLD_NEXT, "dlopen");
|
||||
}
|
||||
const char *basename = filename ? strrchr(filename, '/') : NULL;
|
||||
basename = basename ? basename + 1 : filename;
|
||||
// Steam's deep binding bypasses the robust-list shim under PRoot.
|
||||
if (basename && strcmp(basename, "vrclient.so") == 0) {
|
||||
flags &= ~RTLD_DEEPBIND;
|
||||
}
|
||||
return real_dlopen(filename, flags);
|
||||
}
|
||||
|
||||
int bl_fsync_syscall(long number, const long *args, long *ret) __attribute__((visibility("hidden")));
|
||||
|
||||
static struct robust_list_head *thread_robust_head(void) {
|
||||
|
||||
Reference in new issue
Block a user