diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-14 19:59:27 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-14 19:59:27 +0100 |
commit | 970d87975b01cd083749179df489477b94a35f41 (patch) | |
tree | c4b293e200fd68f74de061450ff4af10e1dc314c /src/Overlay.cpp | |
parent | fed42ee511e387bf1e30d50cf3f327130ae1d131 (diff) |
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r-- | src/Overlay.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 88625d6..da3758e 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -1571,12 +1571,12 @@ namespace gsr { static bool validate_capture_target(const GsrInfo &gsr_info, const std::string &capture_target) { const SupportedCaptureOptions capture_options = get_supported_capture_options(gsr_info); // TODO: Also check x11 window when enabled (check if capture_target is a decminal/hex number) - if(capture_target == "focused" && !capture_options.focused) { - return false; - } else if(capture_target == "screen" && !capture_options.screen) { - return false; - } else if(capture_target == "portal" && !capture_options.portal) { - return false; + if(capture_target == "focused") { + return capture_options.focused; + } else if(capture_target == "screen") { + return capture_options.screen; + } else if(capture_target == "portal") { + return capture_options.portal; } else { for(const GsrMonitor &monitor : capture_options.monitors) { if(capture_target == monitor.name) |