Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI/importers: Translate capture sources depending on display server #11412

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion UI/importers/studio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
******************************************************************************/

#include "importers.hpp"
#if !defined(_WIN32) && !defined(__APPLE__)
#include <obs-nix-platform.h>
WizardCM marked this conversation as resolved.
Show resolved Hide resolved
#endif

using namespace std;
using namespace json11;
Expand Down Expand Up @@ -109,7 +112,13 @@ void TranslateOSStudio(Json &res)
ClearTranslation("av_capture_input", "v4l2_input");
ClearTranslation("dshow_input", "v4l2_input");

ClearTranslation("window_capture", "xcomposite_input");
if (obs_get_nix_platform() == OBS_NIX_PLATFORM_X11_EGL) {
ClearTranslation("game_capture", "xcomposite_input");
ClearTranslation("window_capture", "xcomposite_input");
} else {
ClearTranslation("game_capture", "pipewire-screen-capture-source");
ClearTranslation("window_capture", "pipewire-screen-capture-source");
}

if (id == "monitor_capture") {
source["id"] = "xshm_input";
Expand Down
Loading