1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 22:48:28 -04:00

screenshot: add --json flag to capture metadata

fixes #2852

port 1.5
This commit is contained in:
bbedward
2026-07-15 09:17:24 -04:00
parent 3254cc6a1e
commit f18d36f6c2
3 changed files with 103 additions and 32 deletions
+5
View File
@@ -178,9 +178,13 @@ func (r *RegionSelector) Run() (*CaptureResult, bool, error) {
yInverted := false
var format uint32
scale := 1.0
if r.selection.surface != nil {
yInverted = r.selection.surface.yInverted
format = r.selection.surface.screenFormat
if s := r.selection.surface.output.fractionalScale; s > 0 {
scale = s
}
}
return &CaptureResult{
@@ -188,6 +192,7 @@ func (r *RegionSelector) Run() (*CaptureResult, bool, error) {
Region: r.result,
YInverted: yInverted,
Format: format,
Scale: scale,
}, false, nil
}