From b2728e083105269af52c6f4c13b32d31933e52d1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 20 Jul 2024 02:17:56 +0200 Subject: exit code 60 if portal capture was canceled by the user --- src/capture/portal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/capture') diff --git a/src/capture/portal.c b/src/capture/portal.c index 86cbcbd..6263b8b 100644 --- a/src/capture/portal.c +++ b/src/capture/portal.c @@ -247,8 +247,11 @@ static int gsr_capture_portal_start(gsr_capture *cap, AVCodecContext *video_code // 2: The user interaction was ended in some other way // Response status value 2 happens usually if there was some kind of error in the desktop portal on the system if(response_status == 2) { - fprintf(stderr, "gsr error: gsr_capture_portal_start: desktop portal capture failed. Either you canceled the desktop portal or your Wayland compositor doesn't support desktop portal capture or it's incorrectly setup on your system\n"); + fprintf(stderr, "gsr error: gsr_capture_portal_start: desktop portal capture failed. Either you Wayland compositor doesn't support desktop portal capture or it's incorrectly setup on your system\n"); return 50; + } else if(response_status == 1) { + fprintf(stderr, "gsr error: gsr_capture_portal_start: desktop portal capture failed. It seems like desktop portal capture was canceled by the user.\n"); + return 60; } else { return -1; } -- cgit v1.2.3