Skip to content

Commit

Permalink
linux-capture: Fail to load when running on EGL
Browse files Browse the repository at this point in the history
Right now, linux-capture hard-depends on GLX. Disable it when
running under EGL.
  • Loading branch information
GeorgesStavracas committed Sep 20, 2020
1 parent e08d60f commit ebce735
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/linux-capture/linux-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <obs-module.h>
#include <obs-nix-platform.h>

OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("linux-xshm", "en-US")
Expand All @@ -30,6 +31,11 @@ extern void xcomposite_unload(void);

bool obs_module_load(void)
{
if (obs_get_nix_platform() != OBS_NIX_PLATFORM_X11_GLX) {
blog(LOG_ERROR, "linux-capture cannot run on EGL platforms");
return false;
}

obs_register_source(&xshm_input);
xcomposite_load();
return true;
Expand Down

0 comments on commit ebce735

Please sign in to comment.