LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.58k stars 206 forks source link

call SDL_Quit() on exit to prevent a crash on app exit with linux/wayland #631

Closed laamaa closed 2 weeks ago

laamaa commented 1 month ago

On Bluefin DX Linux (a Fedora Silverblue spinoff) closing the app window brings down the whole Gnome session. Ensuring that SDL_Quit() (https://wiki.libsdl.org/SDL2/SDL_Quit) is called on exit seems to prevent this. The problem happened with both Flatpak and self-compiled versions

laamaa commented 2 weeks ago

Good idea, I added the suggestions to the commit. The issue doesn't seem to happen on vanilla Silverblue/Gnome (without proprietary NVIDIA drivers installed, unlike Bluefin), but I remember bumping into the same problem at some point in my own SDL based project, so it's probably a good idea to have it there just in case...