2

I am using pygame to draw a GUI on tiny SPI LCD mount as /dev/fb1 via directfb.

Whatever I draw, there is a strange symbol display in center of screen. pi logo with strange symbol

green lines with strange symbol

mark of symbol

If I run df_matrix, the strange symbol does not appear.

df_matrix without symbal

If I draw in pygame, then manually open /dev/fb1, write screen data, the strange symbol does not appear.

manual draw to fb without symbol

So, how to get rid of this annoying symbol?

Kingsley
  • 14,398
  • 5
  • 31
  • 53
Mouse
  • 111
  • 1
  • 7

2 Answers2

1

To isolate the problem, I have tried many solutions, upgrade pygame from 1.9.6 to 2.0.0.dev12, invalid. upgrade sdl1 to sdl2, invalid. recompile and install directfb 1.7.7, invalid. invoke pygame.mouse.set_visible(False), invalid. export SDL_NOMOUSE=1, invalid.

finally, as Kingsley and Cribber suggested, it must be a mouse cursor, so I dig out the right solution:

add no-cursor to /etc/directfbrc
Mouse
  • 111
  • 1
  • 7
0

If it is truly the mouse cursor as Kingsley suggested in the comments, you can disable the cursor in pygame with:

pygame.mouse.set_visible(False)
Cribber
  • 2,513
  • 2
  • 21
  • 60
  • I have set that property already before run each test. In addition, os.environ['SDL_NOMOUSE'] = '1' – Mouse Oct 16 '20 at 17:37
  • maybe it is the mouse cursor, and here https://discourse.libsdl.org/t/mouse-set-visible-directfb-fails/9708 someone said pygame + sdl + directfb, the mouse cursor can't be hidden, but I don't know how to execute that code within python. – Mouse Oct 16 '20 at 18:23
  • to be honest pygame is my jam but I don't know enough about sdl / directfb to help you with the problem in the link. – Cribber Oct 17 '20 at 10:50