You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable the update checker by default and add option to disable networking (#2376)
This avoids some privacy concerns linked to pinging an external server each time the game is open.
It also allows the user to decide whether the game should connect to the internet at all.
---------
Co-authored-by: Semphris <[email protected]>
Co-authored-by: Vankata453 <[email protected]>
Copy file name to clipboardExpand all lines: src/supertux/menu/main_menu.cpp
+19
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
#include"gui/menu_item.hpp"
23
23
#include"gui/menu_manager.hpp"
24
24
#include"supertux/fadetoblack.hpp"
25
+
#include"supertux/gameconfig.hpp"
25
26
#include"supertux/globals.hpp"
26
27
#include"supertux/level.hpp"
27
28
#include"supertux/level_parser.hpp"
@@ -68,6 +69,24 @@ MainMenu::MainMenu()
68
69
#endif
69
70
70
71
on_window_resize();
72
+
73
+
#ifndef __EMSCRIPTEN__
74
+
// Show network-related confirmation dialogs on first startup
75
+
if (g_config->is_initial())
76
+
{
77
+
Dialog::show_confirmation(_("Would you allow SuperTux to connect to the Internet?\n\nThis enables additional features, such as the in-game add-on catalog."),
78
+
[]()
79
+
{
80
+
g_config->disable_network = false;
81
+
82
+
Dialog::show_confirmation(_("Would you allow SuperTux to check for new releases on startup?\n\nYou will be notified if any are found."),
add_toggle(MNID_CUSTOM_CURSOR, _("Use custom mouse cursor"), &g_config->custom_mouse_cursor).set_help(_("Whether the game renders its own cursor or uses the system's cursor"));
220
230
221
231
#ifndef __EMSCRIPTEN__
222
-
add_toggle(MNID_RELEASE_CHECK, _("Check for new releases"), &g_config->do_release_check)
223
-
.set_help(_("Allows the game to perform checks for new SuperTux releases on startup and notify if any found."));
232
+
if (!g_config->disable_network)
233
+
add_toggle(MNID_RELEASE_CHECK, _("Check for new releases"), &g_config->do_release_check)
234
+
.set_help(_("Allows the game to perform checks for new SuperTux releases on startup and notify if any found."));
0 commit comments