mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-04-24 18:42:59 +09:00
Revert "Test workaround flatpak issue related to broken flatpak-spawn --host environment missing wayland display"
This reverts commit ec98533f1b.
This commit is contained in:
18
src/main.cpp
18
src/main.cpp
@@ -172,22 +172,6 @@ static void set_display_server_environment_variables() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_x_server_running() {
|
|
||||||
const char *display = getenv("DISPLAY");
|
|
||||||
if(!display)
|
|
||||||
display = ":0";
|
|
||||||
|
|
||||||
const char *port_start = strrchr(display, ':');
|
|
||||||
if(!port_start)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
port_start += 1;
|
|
||||||
|
|
||||||
char path[256];
|
|
||||||
snprintf(path, sizeof(path), "/tmp/.X11-unix/X%s", port_start);
|
|
||||||
return access(path, F_OK) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void usage() {
|
static void usage() {
|
||||||
printf("usage: gsr-ui [action]\n");
|
printf("usage: gsr-ui [action]\n");
|
||||||
printf("OPTIONS:\n");
|
printf("OPTIONS:\n");
|
||||||
@@ -239,8 +223,6 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_display_server_environment_variables();
|
set_display_server_environment_variables();
|
||||||
if(is_flatpak() && !is_x_server_running())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
std::string resources_path;
|
std::string resources_path;
|
||||||
if(access("sibs-build/linux_x86_64/debug/gsr-ui", F_OK) == 0) {
|
if(access("sibs-build/linux_x86_64/debug/gsr-ui", F_OK) == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user