Fix warnings, add Makefile logic for coopnet in other OS

This commit is contained in:
MysterD 2023-04-10 19:45:06 -07:00
parent 1027fdc361
commit ba338ec2dd
3 changed files with 21 additions and 21 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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");