mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 23:20:26 +09:00
Fix focused and portal capture options not allowed
This commit is contained in:
@@ -1571,12 +1571,12 @@ namespace gsr {
|
|||||||
static bool validate_capture_target(const GsrInfo &gsr_info, const std::string &capture_target) {
|
static bool validate_capture_target(const GsrInfo &gsr_info, const std::string &capture_target) {
|
||||||
const SupportedCaptureOptions capture_options = get_supported_capture_options(gsr_info);
|
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)
|
// TODO: Also check x11 window when enabled (check if capture_target is a decminal/hex number)
|
||||||
if(capture_target == "focused" && !capture_options.focused) {
|
if(capture_target == "focused") {
|
||||||
return false;
|
return capture_options.focused;
|
||||||
} else if(capture_target == "screen" && !capture_options.screen) {
|
} else if(capture_target == "screen") {
|
||||||
return false;
|
return capture_options.screen;
|
||||||
} else if(capture_target == "portal" && !capture_options.portal) {
|
} else if(capture_target == "portal") {
|
||||||
return false;
|
return capture_options.portal;
|
||||||
} else {
|
} else {
|
||||||
for(const GsrMonitor &monitor : capture_options.monitors) {
|
for(const GsrMonitor &monitor : capture_options.monitors) {
|
||||||
if(capture_target == monitor.name)
|
if(capture_target == monitor.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user