diff --git a/source/ui/ui-obs-browser-widget.cpp b/source/ui/ui-obs-browser-widget.cpp index 3b5e0cb..7e64741 100644 --- a/source/ui/ui-obs-browser-widget.cpp +++ b/source/ui/ui-obs-browser-widget.cpp @@ -9,6 +9,7 @@ #include "../third-party/obs-studio/plugins/obs-browser/panel/browser-panel.hpp" #include +#include #ifdef D_PLATFORM_LINUX #include #include @@ -111,12 +112,12 @@ void streamfx::ui::obs_browser_widget::set_url(QUrl url) bool streamfx::ui::obs_browser_widget::is_available() { -#ifdef D_PLATFORM_LINUX + #ifdef D_PLATFORM_LINUX const char env_key[] = "XDG_SESSION_TYPE"; const char wayland[] = "wayland"; #ifdef __STDC_LIB_EXT1__ - char env_value[2048]; - size_t env_value_len = sizeof(env_value); + char env_value[2048]; + size_t env_value_len = sizeof(env_value); if (getenv_s(&env_value_len, env_value, sizeof(env_key), env_key) == 0) { if (sizeof(wayland) == env_value_len) { if (strncmp(wayland, env_value, sizeof(wayland)) == 0) { @@ -124,12 +125,12 @@ bool streamfx::ui::obs_browser_widget::is_available() } } } -#else + #else const char* env_value = getenv(env_key); if (strncmp(env_value, wayland, sizeof(wayland)) == 0) { return false; } -#endif -#endif + #endif + #endif return true; } diff --git a/source/ui/ui-obs-browser-widget.hpp b/source/ui/ui-obs-browser-widget.hpp index 176a9dd..bf00331 100644 --- a/source/ui/ui-obs-browser-widget.hpp +++ b/source/ui/ui-obs-browser-widget.hpp @@ -6,6 +6,8 @@ #include "util/util-library.hpp" #include "warning-disable.hpp" +#include + #include #include #include "warning-enable.hpp" @@ -34,6 +36,7 @@ namespace streamfx::ui { class obs_browser_widget : public QWidget { Q_OBJECT + private: std::shared_ptr _cef; QWidget* _widget;