Skip to content

Commit

Permalink
libnx compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schellingb committed Dec 23, 2024
1 parent 79d6fc6 commit de5df8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ else ifeq ($(platform),libnx)
COMMONFLAGS += -I$(LIBNX)/include/ -D__SWITCH__ -DHAVE_LIBNX
COMMONFLAGS += -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIC
STATIC_LINKING = 1
SOURCES += libretro-common/features/features_cpu.inl
else ifeq ($(platform),gcw0)
# You must used the toolchain built on or around 2014-08-20
OUTNAME := dosbox_pure_libretro.so
Expand Down
2 changes: 2 additions & 0 deletions dosbox_pure_libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4265,7 +4265,9 @@ static bool exists_utf8(const char* path, bool* out_is_dir)
#endif
}

#if !defined(HAVE_LIBNX) // platforms that don't support inlining this compile this as a separate object
#include "libretro-common/features/features_cpu.inl"
#endif

bool fpath_nocase(std::string& pathstr, bool* out_is_dir)
{
Expand Down
4 changes: 0 additions & 4 deletions libretro-common/features/features_cpu.inl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ with an environment or platform where the core gets statically linked into a fro
#include "../include/libretro.h"
#include "../include/retro_timers.h"

#define Mutex _Mutex; // avoid conflict in libnx

#if defined(_WIN32) && !defined(_XBOX)
#include <windows.h>
#endif
Expand Down Expand Up @@ -315,5 +313,3 @@ unsigned dbp_cpu_features_get_core_amount(void)
return 1;
#endif
}

#undef Mutex // avoid conflict in libnx

0 comments on commit de5df8f

Please sign in to comment.