From b3e9b69a4d1e2dcdc488f71834c1246c64b57e85 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 7 Jan 2023 11:27:39 +0200 Subject: [PATCH 8/8] sdl/2: Make controlled disconnect from server on quit See osdn #46478 Signed-off-by: Marko Lindqvist --- client/gui-sdl/optiondlg.c | 1 + client/gui-sdl2/optiondlg.c | 1 + 2 files changed, 2 insertions(+) diff --git a/client/gui-sdl/optiondlg.c b/client/gui-sdl/optiondlg.c index 770cc8d676..8f04722ce2 100644 --- a/client/gui-sdl/optiondlg.c +++ b/client/gui-sdl/optiondlg.c @@ -394,6 +394,7 @@ static int exit_callback(struct widget *pWidget) { if (Main.event.button.button == SDL_BUTTON_LEFT) { popdown_optiondlg(TRUE); + disconnect_from_server(); force_exit_from_event_loop(); } return 0; diff --git a/client/gui-sdl2/optiondlg.c b/client/gui-sdl2/optiondlg.c index 9ce0e97e3d..03efdf73c3 100644 --- a/client/gui-sdl2/optiondlg.c +++ b/client/gui-sdl2/optiondlg.c @@ -404,6 +404,7 @@ static int exit_callback(struct widget *pWidget) { if (PRESSED_EVENT(Main.event)) { popdown_optiondlg(TRUE); + disconnect_from_server(); force_exit_from_event_loop(); } -- 2.39.0