SolarWolf crashing in full screen
On Trisquel 11, setting the "Fullscreen" display in SolarWolf's "SETUP" (or having it already configured that way) crashes the game. Here is the terminal output:
pygame 2.1.2 (SDL 2.26.5, Python 3.10.12)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/usr/games/solarwolf", line 192, in <module>
if __name__ == '__main__': main()
File "/usr/games/solarwolf", line 59, in main
exception_handler()
File "/usr/games/solarwolf", line 49, in main
main.main(sys.argv)
File "/usr/lib/games/solarwolf/main.py", line 18, in main
gamemain(args)
File "/usr/lib/games/solarwolf/main.py", line 78, in gamemain
if event.state == 4 and event.gain:
AttributeError: 'Event' object has no attribute 'state'
https://dcc.ufmg.br/~lcerf/2024-02-28-15-48-22.webm shows the problem and a workaround: commenting lines 77-87 of /usr/lib/games/solarwolf/main.py avoids the execution of the line testing event.state. SolwarWolf then runs fine. In the OBS record, the video appears black, but the game was actually running. The (in)existence of ~/.solarwolf makes no difference.
The problem affects as well Xubuntu 22.04.2 according to https://github.com/pygame/solarwolf/issues/13 where I detail the resolutions my screen goes through. So, I guess the problem is not to be solved at Trisquel's level but @Ark74 asked me to open an issue because there is no crash on a fresh install of Trisquel 11.0.1: !1286 (comment 11557)