linux-pipewire: Load glad symbols on start

After the cmake 3.0 rebuild glad was transitioned to a static library.
This lead to the glad symbols being uninitialized and crashes when they
are used in some cases.

(cherry picked from commit 5cf0f06669)
This commit is contained in:
Kurt Kartaltepe
2023-10-26 16:24:51 -04:00
committed by Ryan Foster
parent f97d72c412
commit 9f79146a12
+5
View File
@@ -21,6 +21,7 @@
#include <obs-module.h>
#include <obs-nix-platform.h>
#include <glad/glad.h>
#include <pipewire/pipewire.h>
#include "screencast-portal.h"
@@ -34,6 +35,10 @@ MODULE_EXPORT const char *obs_module_description(void)
bool obs_module_load(void)
{
obs_enter_graphics();
gladLoadGL();
obs_leave_graphics();
pw_init(NULL, NULL);
screencast_portal_load();