Skip to content

Commit 3e194bd

Browse files
committed
fbscreenshot: fix garbled output or whatever
1 parent a45a48a commit 3e194bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/fb.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ proc fbscreenshot*(fbMap: pointer, output: string) =
5050

5151
for x in 0..<FbWidth:
5252
let colBase = x * FbHeight
53-
var srcBase = x * 2
53+
var srcBase = x
5454

5555
for y in 0..<FbHeight:
5656
let pixel = fbData[srcBase]
57-
srcBase += FbWidth * 2
57+
srcBase += FbWidth
5858

5959
rotatedPixels[colBase + FbHeight - 1 - y] = uint32(FiveToEight[(pixel shr 11) and 0x1F]) or
6060
(uint32(SixToEight[(pixel shr 5) and 0x3F]) shl 8) or

0 commit comments

Comments
 (0)