Skip to content

Commit

Permalink
add RAW /dev/fb0 data screenshots
Browse files Browse the repository at this point in the history
requires re-encoding or dedicated app to read
  • Loading branch information
Apaczer committed Jul 19, 2023
1 parent 40c441a commit 5e22203
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ Remember: all hotkeys will work only in combination with RESET/HOME button (see
10 = backlight min max
11 = remount /mnt as rw
12 = remount /mnt as ro
13 = screenshot in PNG using fbgrab (slow - more accurate)
14 = screenshot in PPM using fbcat (fast - less accurate)
13 = screenshot in PNG using fbgrab (slow/accurate)
14 = screenshot in PPM using fbcat (fast/less accurate)
15 = screenshot in RAW framebuffer data - copy of=/dev/fb0 (fast/accurate)
20 = kill, sync and shutdown (quick shutdown)
21 = kill gui. Does not work on most apps. do not use
22 = kill force app. Work on most apps.
Expand Down
3 changes: 3 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ int main(int argc, char** argv)
case 14:
system("mkdir -p /mnt/screenshots ; name=/mnt/screenshots/system ; if test -e $name.ppm ; then i=1 ; while test -e $name-$i.ppm ; do i=$((i+1)) ; done; name=\"$name-$i\" ; fi ; fbcat > \"$name\".ppm");
break;
case 15:
system("mkdir -p /mnt/screenshots ; name=/mnt/screenshots/system ; if test -e $name.raw ; then i=1 ; while test -e $name-$i.raw ; do i=$((i+1)) ; done; name=\"$name-$i\" ; fi ; dd if=/dev/fb0 of=\"$name\".raw bs=1M");
break;
case 20:
{
//printf("quick shutdown\n");
Expand Down

0 comments on commit 5e22203

Please sign in to comment.