ppizarror / pygame-menu

A menu for pygame. Simple, and easy to use
https://pygame-menu.readthedocs.io/
Other
544 stars 141 forks source link

Have a _sdl2 mode where make_surface is never called whith alpha=True #470

Open cbdj opened 1 year ago

cbdj commented 1 year ago

Is your feature request related to a problem? Please describe. When using pygame-menu(-ce) in sdl2 mode, we get exceptions each time make_surface is called with alpha=True :

No video mode has been set File "C:\Users*****\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygame_menu\utils.py", line 434, in make_surface surface = pygame.Surface.convert_alpha(surface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Describe the solution you'd like convert_alpha should no more be called as it no longer provide much improvement in normal mode, and breaks sdl2 mode.

Describe alternatives you've considered Or there should be a sdl2 mode...