From ba338ec2dd1a950a0c8e99cfe75cde58cb6da517 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 10 Apr 2023 19:45:06 -0700 Subject: [PATCH] Fix warnings, add Makefile logic for coopnet in other OS --- Makefile | 35 +++++++++++++++++----------------- src/pc/djui/djui_lobby_entry.c | 2 +- src/pc/djui/djui_panel_join.c | 5 +++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index e2c754fe..57760fff 100644 --- a/Makefile +++ b/Makefile @@ -985,25 +985,24 @@ endif # coopnet ifeq ($(COOPNET),1) - LDFLAGS += -Llib/coopnet/linux -l:libcoopnet.a -l:libjuice.a + ifeq ($(WINDOWS_BUILD),1) + ifeq ($(TARGET_BITS), 32) + LDFLAGS += -Llib/coopnet/win32 -l:libcoopnet.a + else + LDFLAGS += -Llib/coopnet/win64 -l:libcoopnet.a + endif + else ifeq ($(OSX_BUILD),1) + LDFLAGS += -L./lib/coopnet/mac/ -l coopnet + else ifeq ($(TARGET_RPI),1) + ifneq (,$(findstring aarch64,$(machine))) + LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm64.a + else + LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm.a + endif + else + LDFLAGS += -Llib/coopnet/linux -l:libcoopnet.a -l:libjuice.a + endif endif -#ifeq ($(WINDOWS_BUILD),1) -# ifeq ($(TARGET_BITS), 32) -# LDFLAGS += -Llib/coopnet/win32 -l:libcoopnet.a -# else -# LDFLAGS += -Llib/coopnet/win64 -l:libcoopnet.a -# endif -#else ifeq ($(OSX_BUILD),1) -# LDFLAGS += -L./lib/coopnet/mac/ -l coopnet -#else ifeq ($(TARGET_RPI),1) -# ifneq (,$(findstring aarch64,$(machine))) -# LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm64.a -# else -# LDFLAGS += -Llib/coopnet/linux -l:libcoopnet-arm.a -# endif -#else -# LDFLAGS += -Llib/coopnet/linux -l:libcoopnet.a -#endif # Network/Discord/Bass (ugh, needs cleanup) ifeq ($(WINDOWS_BUILD),1) diff --git a/src/pc/djui/djui_lobby_entry.c b/src/pc/djui/djui_lobby_entry.c index 2bbd44fc..b2d480a5 100644 --- a/src/pc/djui/djui_lobby_entry.c +++ b/src/pc/djui/djui_lobby_entry.c @@ -70,7 +70,7 @@ struct DjuiLobbyEntry* djui_lobby_entry_create(struct DjuiBase* parent, char* ho djui_base_set_size(&text->base, width, 1.0f); djui_base_set_color(&text->base, 11, 11, 11, 255); - djui_text_set_alignment(&text->base, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER); + djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_CENTER); djui_text_set_drop_shadow(text, 64, 64, 64, 100); x += width; } diff --git a/src/pc/djui/djui_panel_join.c b/src/pc/djui/djui_panel_join.c index a6bacae2..376d4300 100644 --- a/src/pc/djui/djui_panel_join.c +++ b/src/pc/djui/djui_panel_join.c @@ -12,6 +12,7 @@ #include "src/pc/utils/misc.h" #include "src/pc/configfile.h" #include "src/pc/debuglog.h" +#include "macros.h" static struct DjuiFlowLayout* sLobbyLayout = NULL; static struct DjuiInputbox* sInputboxIp = NULL; @@ -160,7 +161,7 @@ void djui_panel_join_lobby(struct DjuiBase* caller) { djui_panel_join_message_create(caller); } -void djui_panel_join_query(uint64_t aLobbyId, uint64_t aOwnerId, uint16_t aConnections, uint16_t aMaxConnections, const char* aGame, const char* aVersion, const char* aTitle) { +void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t aConnections, uint16_t aMaxConnections, UNUSED const char* aGame, UNUSED const char* aVersion, const char* aTitle) { char playerText[64]; snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections); @@ -188,8 +189,8 @@ void djui_panel_join_create(struct DjuiBase* caller) { sLobbyLayout = paginated->layout; djui_flow_layout_set_margin(sLobbyLayout, 4); - struct DjuiBase* layoutBase = &sLobbyLayout->base; #if 0 + struct DjuiBase* layoutBase = &sLobbyLayout->base; for (int i = 0; i < 4; i++) { djui_lobby_entry_create(layoutBase, "MysterD", "Super Mario 64", "15/16"); djui_lobby_entry_create(layoutBase, "djoslin0", "Star Road", "1/16");