From bde97e40765bb2a305e432070af30dd8e3048ef2 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 7 Apr 2024 16:57:06 +1000 Subject: [PATCH] Makefile compiled builds have the icon now Also fix flatpak .xml file, inventory shouldn't be closed when B is pressed in classic mode --- Makefile | 11 ++++++----- .../net.classicube.flatpak.client.metainfo.xml | 1 - src/Screens.c | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e984b8369..cb7ec1c2c 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ LIBS = -mwindows -lwinmm -limagehlp endif ifeq ($(PLAT),linux) +CFLAGS = -g -pipe -fno-math-errno -DCC_BUILD_ICON LIBS = -lX11 -lXi -lpthread -lGL -ldl endif @@ -43,31 +44,31 @@ endif ifeq ($(PLAT),darwin) OBJECTS += $(BUILD_DIR)/interop_cocoa.o -CFLAGS = -g -pipe -fno-math-errno +CFLAGS = -g -pipe -fno-math-errno -DCC_BUILD_ICON LIBS = LDFLAGS = -rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc endif ifeq ($(PLAT),freebsd) -CFLAGS = -g -pipe -I /usr/local/include -fno-math-errno +CFLAGS = -g -pipe -I /usr/local/include -fno-math-errno -DCC_BUILD_ICON LDFLAGS = -L /usr/local/lib -rdynamic LIBS = -lexecinfo -lGL -lX11 -lXi -lpthread endif ifeq ($(PLAT),openbsd) -CFLAGS = -g -pipe -I /usr/X11R6/include -I /usr/local/include -fno-math-errno +CFLAGS = -g -pipe -I /usr/X11R6/include -I /usr/local/include -fno-math-errno -DCC_BUILD_ICON LDFLAGS = -L /usr/X11R6/lib -L /usr/local/lib -rdynamic LIBS = -lexecinfo -lGL -lX11 -lXi -lpthread endif ifeq ($(PLAT),netbsd) -CFLAGS = -g -pipe -I /usr/X11R7/include -I /usr/pkg/include -fno-math-errno +CFLAGS = -g -pipe -I /usr/X11R7/include -I /usr/pkg/include -fno-math-errno -DCC_BUILD_ICON LDFLAGS = -L /usr/X11R7/lib -L /usr/pkg/lib -rdynamic LIBS = -lexecinfo -lGL -lX11 -lXi -lpthread endif ifeq ($(PLAT),dragonfly) -CFLAGS = -g -pipe -I /usr/local/include -fno-math-errno +CFLAGS = -g -pipe -I /usr/local/include -fno-math-errno -DCC_BUILD_ICON LDFLAGS = -L /usr/local/lib -rdynamic LIBS = -lexecinfo -lGL -lX11 -lXi -lpthread endif diff --git a/misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml b/misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml index 7d1cb0e06..7810cb367 100644 --- a/misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml +++ b/misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml @@ -108,7 +108,6 @@ https://github.com/ClassiCube/ClassiCube/releases/tag/1.1.1 - https://www.classicube.net/ https://github.com/ClassiCube/ClassiCube/issues diff --git a/src/Screens.c b/src/Screens.c index 4eeb7a8a9..064121c2a 100644 --- a/src/Screens.c +++ b/src/Screens.c @@ -1644,7 +1644,7 @@ static void InventoryScreen_MoveToSelected(struct InventoryScreen* s) { s->deferredSelect = false; if (Game_ClassicMode) { - /* Original classic preserves selected block across inventory menu opens */ + /* Accuracy: Original classic preserves selected block across inventory menu opens */ TableWidget_SetToIndex(table, table->selectedIndex); } else { TableWidget_SetToBlock(table, Inventory_SelectedBlock); @@ -1709,7 +1709,8 @@ static int InventoryScreen_KeyDown(void* screen, int key) { struct InventoryScreen* s = (struct InventoryScreen*)screen; struct TableWidget* table = &s->table; - if (KeyBind_Claims(KEYBIND_INVENTORY, key) && s->releasedInv) { + /* Accuracy: Original classic doesn't close inventory menu when B is pressed */ + if (KeyBind_Claims(KEYBIND_INVENTORY, key) && s->releasedInv && !Game_ClassicMode) { Gui_Remove((struct Screen*)s); } else if (Input_IsEnterButton(key) && table->selectedIndex != -1) { Inventory_SetSelectedBlock(table->blocks[table->selectedIndex]);