mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-24 13:41:14 +00:00
Disable the DRM master hooks when EGLFS isn't used
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
extern int g_QtDrmMasterFd;
|
||||
extern struct stat g_DrmMasterStat;
|
||||
extern bool g_DisableDrmHooks;
|
||||
|
||||
#define MAX_SDL_FD_COUNT 8
|
||||
int g_SdlDrmMasterFds[MAX_SDL_FD_COUNT];
|
||||
@@ -114,6 +115,10 @@ int openHook(typeof(open) *real_open, typeof(close) *real_close, const char *pat
|
||||
fd = real_open(pathname, flags);
|
||||
}
|
||||
|
||||
if (g_DisableDrmHooks) {
|
||||
return fd;
|
||||
}
|
||||
|
||||
// If the file was successfully opened and we have a DRM master FD,
|
||||
// check if the FD we just opened is a DRM device.
|
||||
if (fd >= 0 && g_QtDrmMasterFd != -1) {
|
||||
|
||||
Reference in New Issue
Block a user