File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ get_target_property(libdrm_include_directories Libdrm::Libdrm INTERFACE_INCLUDE_
44
55target_include_directories (obs-browser PRIVATE ${libdrm_include_directories} )
66
7- target_link_libraries (obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11)
7+ target_link_libraries (obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11 OBS::glad )
88set_target_properties (obs-browser PROPERTIES BUILD_RPATH "$ORIGIN/" INSTALL_RPATH "$ORIGIN/" )
99
1010target_sources (obs-browser PRIVATE drm-format.cpp drm-format.hpp)
Original file line number Diff line number Diff line change 5656#endif
5757
5858#if !defined(_WIN32) && !defined(__APPLE__)
59+ #include < glad/glad.h>
5960#include " drm-format.hpp"
6061#endif
6162
@@ -705,6 +706,24 @@ static void check_hwaccel_support(void)
705706 }
706707 }
707708}
709+ #elif __linux__
710+ static void check_hwaccel_support (void )
711+ {
712+ /* NOTE: GL_VERSION returns a string that contains the driver vendor */
713+ const char *glVersion = NULL ;
714+
715+ obs_enter_graphics ();
716+ gladLoadGL ();
717+ glVersion = (const char *)glGetString (GL_VERSION);
718+ obs_leave_graphics ();
719+
720+ if (strstr (glVersion, " NVIDIA" ) != NULL ) {
721+ hwaccel = false ;
722+ blog (LOG_INFO,
723+ " [obs-browser]: Blacklisted driver detected, disabling browser source hardware acceleration." );
724+ }
725+ return ;
726+ }
708727#else
709728static void check_hwaccel_support (void )
710729{
You can’t perform that action at this time.
0 commit comments