diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-06-04 01:32:30 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-06-04 01:32:30 +0200 |
commit | 7d2f2e9b47b15af25ebcda1023c0fef662845f81 (patch) | |
tree | b340c13ac343406059a4d28b15e8089eaf105429 /src/main.cpp | |
parent | 636150ef08867178ca8a826e912502112865346d (diff) |
Show error notification if another gpu screen recorder process is running when starting the ui
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 31ec8ff..a68ff7d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -240,6 +240,11 @@ int main(int argc, char **argv) { return 1; } + if(gsr::pidof("gpu-screen-recorder", getpid()) != -1) { + const char *args[] = { "gsr-notify", "--text", "GPU Screen Recorder is already running in another process.\nPlease close it before using GPU Screen Recorder UI.", "--timeout", "5.0", "--icon-color", "ff0000", "--bg-color", "ff0000", nullptr }; + gsr::exec_program_daemonized(args); + } + if(is_flatpak()) install_flatpak_systemd_service(); else |