Merge pull request #14 from danshick/cursor_overlay_flag
Added cli flag to change overlay_cursor option, defaulting to falsepull/15/head
commit
4d6f477d71
11
src/main.c
11
src/main.c
|
@ -575,6 +575,7 @@ int wayvnc_usage(FILE* stream, int rc)
|
||||||
" -o,--output=<name> Select output to capture.\n"
|
" -o,--output=<name> Select output to capture.\n"
|
||||||
" -k,--keyboard=<layout> Select keyboard layout.\n"
|
" -k,--keyboard=<layout> Select keyboard layout.\n"
|
||||||
" -s,--seat=<name> Select seat by name.\n"
|
" -s,--seat=<name> Select seat by name.\n"
|
||||||
|
" -r,--render-cursor Enable overlay cursor rendering.\n"
|
||||||
" -h,--help Get help (this text).\n"
|
" -h,--help Get help (this text).\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
@ -631,8 +632,10 @@ int main(int argc, char* argv[])
|
||||||
const char* output_name = NULL;
|
const char* output_name = NULL;
|
||||||
enum frame_capture_backend_type fcbackend = FRAME_CAPTURE_BACKEND_NONE;
|
enum frame_capture_backend_type fcbackend = FRAME_CAPTURE_BACKEND_NONE;
|
||||||
const char* seat_name = NULL;
|
const char* seat_name = NULL;
|
||||||
|
|
||||||
|
bool overlay_cursor = false;
|
||||||
|
|
||||||
static const char* shortopts = "C:c:o:k:s:h";
|
static const char* shortopts = "C:c:o:k:s:rh";
|
||||||
|
|
||||||
static const struct option longopts[] = {
|
static const struct option longopts[] = {
|
||||||
{ "config", required_argument, NULL, 'C' },
|
{ "config", required_argument, NULL, 'C' },
|
||||||
|
@ -640,6 +643,7 @@ int main(int argc, char* argv[])
|
||||||
{ "output", required_argument, NULL, 'o' },
|
{ "output", required_argument, NULL, 'o' },
|
||||||
{ "keyboard", required_argument, NULL, 'k' },
|
{ "keyboard", required_argument, NULL, 'k' },
|
||||||
{ "seat", required_argument, NULL, 's' },
|
{ "seat", required_argument, NULL, 's' },
|
||||||
|
{ "render-cursor", no_argument, NULL, 'r' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
@ -671,6 +675,9 @@ int main(int argc, char* argv[])
|
||||||
case 's':
|
case 's':
|
||||||
seat_name = optarg;
|
seat_name = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'r':
|
||||||
|
overlay_cursor = true;
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
return wayvnc_usage(stdout, 0);
|
return wayvnc_usage(stdout, 0);
|
||||||
default:
|
default:
|
||||||
|
@ -814,6 +821,8 @@ int main(int argc, char* argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.capture_backend->overlay_cursor = overlay_cursor;
|
||||||
|
|
||||||
if (wayvnc_start_capture(&self) < 0)
|
if (wayvnc_start_capture(&self) < 0)
|
||||||
goto capture_failure;
|
goto capture_failure;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue