alexbatalov / fallout2-ce

Fallout 2 for modern operating systems
Other
1.69k stars 110 forks source link

Desktop screen resolution is not restored on crash (Linux) #317

Open seadra opened 1 year ago

seadra commented 1 year ago

Whenever fallout2 crashes, the desktop is left at some very low resolution. How about adding atexit(SDL_Quit); to clean all all subsystems including video?

1vanK commented 2 months ago

As far as I know atexit() is not called on crash

seadra commented 2 months ago

I think it should be added whether it is called during a crash or not, because at the moment, the program can exit without cleanly terminating the SDL video subsystem. For example:

https://github.com/alexbatalov/fallout2-ce/blob/9fb917c357b20d95d597bed4d67904c29cd5c753/src/input.cc#L1126C1-L1127C32

just calls the libc exit.

I can't find any instance of SDL_Quit() or SDL_QuitSubSystem(SDL_INIT_VIDEO) in the current code base.