Fix EGLFS state restoration after Vulkan rendering

This commit is contained in:
Cameron Gutman
2024-09-23 21:32:09 -05:00
parent 023b6b2772
commit 0e2d5bf441
2 changed files with 42 additions and 5 deletions
+9 -3
View File
@@ -149,9 +149,15 @@ int openHook(const char *funcname, const char *pathname, int flags, va_list va)
}
}
// Insert the FD into the table
g_SdlDrmMasterFds[freeFdIndex] = fd;
g_SdlDrmMasterFdCount++;
if (fd >= 0) {
// Start with DRM master on the new FD
drmSetMaster(fd);
// Insert the FD into the table
g_SdlDrmMasterFds[freeFdIndex] = fd;
g_SdlDrmMasterFdCount++;
}
SDL_AtomicUnlock(&g_FdTableLock);
}
}