SHARE
TWEET

Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # Check for file name
  3. if [ $# -eq 0 ]; then
  4.     echo "Please specify a video mode"
  5.     exit 1
  6. fi
  7.  
  8. case $1 in
  9.     R5)
  10. layer-control /dev/fb0 s enable on
  11. layer-control /dev/fb0 s format R5G6B5
  12. layer-control /dev/fb0 s hstride 2
  13. layer-control /dev/fb0 s vstride 640
  14. layer-control /dev/fb0 s position 0 0 320 240
  15. layer-control /dev/fb0 s dirty
  16. ;;
  17.     B5)
  18. layer-control /dev/fb0 s enable on
  19. layer-control /dev/fb0 s format B5G6B5
  20. layer-control /dev/fb0 s hstride 2
  21. layer-control /dev/fb0 s vstride 640
  22. layer-control /dev/fb0 s position 0 0 320 240
  23. layer-control /dev/fb0 s dirty
  24. ;;
  25.     R8)
  26. layer-control /dev/fb0 s enable on
  27. layer-control /dev/fb0 s format R8G8B8
  28. layer-control /dev/fb0 s hstride 3
  29. layer-control /dev/fb0 s vstride 960
  30. layer-control /dev/fb0 s position 0 0 320 240
  31. layer-control /dev/fb0 s dirty
  32. ;;
  33.     B8)
  34. layer-control /dev/fb0 s enable on
  35. layer-control /dev/fb0 s format B8G8R8
  36. layer-control /dev/fb0 s hstride 3
  37. layer-control /dev/fb0 s vstride 960
  38. layer-control /dev/fb0 s position 0 0 320 240
  39. layer-control /dev/fb0 s dirty
  40. ;;
  41.     AR8)
  42. layer-control /dev/fb0 s enable on
  43. layer-control /dev/fb0 s format A8R8G8B8
  44. layer-control /dev/fb0 s hstride 4
  45. layer-control /dev/fb0 s vstride 1280
  46. layer-control /dev/fb0 s position 0 0 320 240
  47. layer-control /dev/fb0 s dirty
  48. ;;
  49.     AB8)
  50. layer-control /dev/fb0 s enable on
  51. layer-control /dev/fb0 s format A8R8G8B8
  52. layer-control /dev/fb0 s hstride 4
  53. layer-control /dev/fb0 s vstride 1280
  54. layer-control /dev/fb0 s position 0 0 320 240
  55. layer-control /dev/fb0 s dirty
  56. ;;
  57.  
  58.     *)
  59.     echo video_mode ": Unknown"
  60. ;;
  61. esac
RAW Paste Data
Top