Skip to content

Commit

Permalink
fixes for non-3ds platform/makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Jun 12, 2024
1 parent e3d50ed commit ce3f288
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
13 changes: 8 additions & 5 deletions helpers/Makefile.sdl2
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
ifeq ($(OS),Windows_NT)
LIBS += -lmingw32 -lSDL2main
CFLAGS += -DWIN32
ifeq (pc,$(MAKECMDGOALS))
ifeq ($(OS),Windows_NT)
LIBS += -lmingw32 -lSDL2main
CFLAGS += -DWIN32
endif
endif

LIBS += -lSDL2_ttf -lSDL2_image -lmpg123 -lSDL2 -lSDL2main -lfreetype -lpng -lbz2 -ljpeg -lz
CFLAGS += -DSDL2

ifneq (3ds,$(MAKECMDGOALS))
CFLAGS += -DMUSIC -lSDL2_gfx -lSDL2_mixer
endif
CFLAGS += -DMUSIC
LIBS += -lSDL2_gfx -lSDL2_mixer
endif
2 changes: 1 addition & 1 deletion helpers/Makefile.switch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EXEFS_SRC := exefs_src
ARCH += -march=armv8-a+crc+crypto -mtune=cortex-a57 -fPIE

CFLAGS += -g -Wall -O2 \
$(ARCH) $(DEFINES)
$(ARCH) $(DEFINES) -Wno-implicit-function-declaration

CFLAGS += $(INCLUDE) -DSWITCH -D__LIBNX__ -DUSE_FILE32API -DNOSTYLUS -D_XOPEN_SOURCE -DUSE_RAMFS -DMUSIC

Expand Down
2 changes: 1 addition & 1 deletion src/DrawUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void CST_rectangleRGBA (
) {
#if !defined(_3DS) && !defined(_3DS_MOCK)
// TODO: rectangleRGBA needs to take a surface on 3DS
rectangleRGBA(renderer, x1, y1, x2, y2, rad, r, g, b, a);
rectangleRGBA(renderer, x1, y1, x2, y2, r, g, b, a);
#endif
}

Expand Down
6 changes: 2 additions & 4 deletions src/DrawUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>

#if defined(_3DS)
#include <SDL2/SDL_gfxPrimitives.h> // this file has a different name on 3ds
#else
#include <SDL2/SDL2_gfxPrimitives.h>
#if !defined(_3DS)
#include <SDL2/SDL2_gfxPrimitives.h> // 3ds has no gfx library
#endif

#include "../libs/SDL_FontCache/SDL_FontCache.h"
Expand Down

0 comments on commit ce3f288

Please sign in to comment.