- Move screen capture to child process - Isolate GDI/BitBlt crashes from agent - Use -capture flag for internal helper mode - Add protocol for frame request/response - Make monitor enumeration thread-safe
24 lines
597 B
Go
24 lines
597 B
Go
package instance
|
|
|
|
import "strings"
|
|
|
|
func filterArgs(args []string) []string {
|
|
out := make([]string, 0, len(args))
|
|
for _, arg := range args {
|
|
name := strings.TrimLeft(arg, "-/")
|
|
lower := strings.ToLower(name)
|
|
switch {
|
|
case lower == "background" || strings.HasPrefix(lower, "background="):
|
|
continue
|
|
case lower == "foreground" || strings.HasPrefix(lower, "foreground="):
|
|
continue
|
|
case lower == "ensure" || strings.HasPrefix(lower, "ensure="):
|
|
continue
|
|
case lower == "capture" || strings.HasPrefix(lower, "capture="):
|
|
continue
|
|
}
|
|
out = append(out, arg)
|
|
}
|
|
return out
|
|
}
|