Skip to content

Commit

Permalink
Fix CI server build + minor
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Feb 27, 2025
1 parent 3db1942 commit 9fdcb13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gui/touchscreenlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "IGUIStaticText.h"
#include "util/enum_string.h"

struct EnumString es_TouchInteractionStyle[] =
const struct EnumString es_TouchInteractionStyle[] =
{
{TAP, "tap"},
{TAP_CROSSHAIR, "tap_crosshair"},
Expand Down
2 changes: 1 addition & 1 deletion src/gui/touchscreenlayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum TouchInteractionStyle : u8
TAP_CROSSHAIR,
BUTTONS_CROSSHAIR,
};
extern EnumString es_TouchInteractionStyle[];
extern const struct EnumString es_TouchInteractionStyle[];

enum touch_gui_button_id : u8
{
Expand Down
5 changes: 1 addition & 4 deletions src/migratesettings.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Minetest
// SPDX-License-Identifier: LGPL-2.1-or-later

#include "gui/touchscreenlayout.h"
#include "settings.h"
#include "server.h"
#include "util/enum_string.h"

void migrate_settings()
{
Expand Down Expand Up @@ -34,8 +32,7 @@ void migrate_settings()
// Convert touch_use_crosshair to touch_interaction_style
if (g_settings->existsLocal("touch_use_crosshair")) {
bool value = g_settings->getBool("touch_use_crosshair");
g_settings->set("touch_interaction_style",
enum_to_string(es_TouchInteractionStyle, value ? TAP_CROSSHAIR : TAP));
g_settings->set("touch_interaction_style", value ? "tap_crosshair" : "tap");
g_settings->remove("touch_use_crosshair");
}
}

0 comments on commit 9fdcb13

Please sign in to comment.