ports/devel/electron32/files/patch-remoting_host_desktop__capturer__proxy.cc
Hiroki Tagato 63a5b151bf devel/electron32: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://electronjs.org/
2024-09-23 04:58:21 +09:00

29 lines
1.1 KiB
C++

--- remoting/host/desktop_capturer_proxy.cc.orig 2024-04-15 20:34:03 UTC
+++ remoting/host/desktop_capturer_proxy.cc
@@ -26,7 +26,7 @@
#include "remoting/host/chromeos/frame_sink_desktop_capturer.h"
#endif
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#include "base/environment.h"
#include "base/nix/xdg_util.h"
#include "remoting/host/linux/wayland_desktop_capturer.h"
@@ -91,7 +91,7 @@ void DesktopCapturerProxy::Core::CreateCapturer(
#if BUILDFLAG(IS_CHROMEOS_ASH)
capturer_ = std::make_unique<FrameSinkDesktopCapturer>();
-#elif BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
static base::nix::SessionType session_type = base::nix::SessionType::kUnset;
if (session_type == base::nix::SessionType::kUnset) {
std::unique_ptr<base::Environment> env = base::Environment::Create();
@@ -298,7 +298,7 @@ bool DesktopCapturerProxy::SupportsFrameCallbacks() {
bool DesktopCapturerProxy::SupportsFrameCallbacks() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
return IsRunningWayland();
#else
return false;