The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: ceeac on March 31, 2024, 06:20:11 PM

Title: [r10754+] SDL_QUIT is ignored most of the time
Post by: ceeac on March 31, 2024, 06:20:11 PM
Since r10754, closing the main window using the x button does not work most of the time while the banner window is open. Seems to work after multiple repeated attempts (usually 5+, this is variable). Control-C in the terminal to exit the program does not work most of the time either. The program receives an SDL_QUIT message from SDL, but the corresponding sys_event seems to be ignored.
Title: Re: [r10754+] SDL_QUIT is ignored most of the time
Post by: prissi on April 02, 2024, 01:16:30 PM
r11106 fixes this, thnak you.
Title: Re: [r10754+] SDL_QUIT is ignored most of the time
Post by: ceeac on April 02, 2024, 07:41:32 PM
For me, the bug still happens when the pakset is loaded from the program directory. If the pakset is loaded from the user (home) directory, everything works correctly.
Title: Re: [r10754+] SDL_QUIT is ignored most of the time
Post by: prissi on April 03, 2024, 04:23:22 AM
For me it worked with any pak location.

Since the banner window did not handle the SDL_quit event at all, the location of the pakset did not matter. Any closing of simutrans during the banner screen before the change was due to the OS closing the window on the 5th retry (at least under windows).

Do you mean, if you start without selecting the pakset manually?
Title: Re: [r10754+] SDL_QUIT is ignored most of the time
Post by: Roboron on April 04, 2024, 08:48:31 PM
I can not reproduce after r11106. Doesn't matter how I load the pakset, closing the windows will close Simutrans. And I don't see why the pakset location should matter, the banner is always the same
Title: Re: [r10754+] SDL_QUIT is ignored most of the time
Post by: ceeac on April 05, 2024, 06:09:14 PM
Hm, this seems to be timing dependent, not directly related to the pakset location... Looking at simwin.cc line 2182, the quit event seems to be ignored when the event is processed by win_poll_event and not during the sync_step. So, this is hopefully fixed for good in r11123.