Commit b957a0a 1 parent 7c2b9f2 commit b957a0a Copy full SHA for b957a0a
File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ target_compile_definitions(obs-browser PRIVATE ENABLE_BROWSER_QT_LOOP)
6
6
7
7
target_include_directories (obs-browser PRIVATE ${libdrm_include_directories} )
8
8
9
- target_link_libraries (obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11)
9
+ target_link_libraries (obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11 OBS::glad )
10
10
set_target_properties (obs-browser PROPERTIES BUILD_RPATH "$ORIGIN/" INSTALL_RPATH "$ORIGIN/" )
11
11
12
12
target_sources (obs-browser PRIVATE drm-format.cpp drm-format.hpp)
Original file line number Diff line number Diff line change 56
56
#endif
57
57
58
58
#if !defined(_WIN32) && !defined(__APPLE__)
59
+ #include < glad/glad.h>
59
60
#include " drm-format.hpp"
60
61
#endif
61
62
@@ -700,6 +701,28 @@ static void check_hwaccel_support(void)
700
701
}
701
702
}
702
703
}
704
+ #elif __linux__
705
+ static void check_hwaccel_support (void )
706
+ {
707
+ /* NOTE: GL_VERSION returns a string that contains the driver vendor */
708
+ const char *glVersion = NULL ;
709
+
710
+ obs_enter_graphics ();
711
+ gladLoadGL ();
712
+ glVersion = (const char *)glGetString (GL_VERSION);
713
+ obs_leave_graphics ();
714
+
715
+ if (strstr (glVersion, " NVIDIA" ) != NULL ) {
716
+ hwaccel = false ;
717
+ blog (LOG_INFO, " [obs-browser]: "
718
+ " Blacklisted driver "
719
+ " detected, "
720
+ " disabling browser "
721
+ " source hardware "
722
+ " acceleration." );
723
+ }
724
+ return ;
725
+ }
703
726
#else
704
727
static void check_hwaccel_support (void )
705
728
{
You can’t perform that action at this time.
0 commit comments