From 88dc063127bc02ac84b5c0adee23690690d40919 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Mon, 27 May 2024 11:40:42 -0400 Subject: [PATCH] refine multi viewport support (#604) --- src/window/gui/Gui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/window/gui/Gui.cpp b/src/window/gui/Gui.cpp index 04e777c..0635795 100644 --- a/src/window/gui/Gui.cpp +++ b/src/window/gui/Gui.cpp @@ -233,6 +233,16 @@ void Gui::LoadTextureFromRawImage(const std::string& name, const std::string& pa } bool Gui::SupportsViewports() { +#ifdef __linux__ + if (std::string(std::getenv("XDG_CURRENT_DESKTOP")) == "gamescope") { + return false; + } +#endif + +#if defined(__ANDROID__) || defined(__IOS__) + return false; +#endif + switch (Context::GetInstance()->GetWindow()->GetWindowBackend()) { case WindowBackend::DX11: return true;