mirror of https://github.com/sm64pc/sm64pc.git
Merge branch 'nightly' into nightly
This commit is contained in:
commit
f085379e6b
11
Makefile
11
Makefile
|
@ -33,6 +33,9 @@ OSX_BUILD ?= 0
|
|||
# Makeflag to enable OSX fixes on older versions
|
||||
LEGACY_OSX_BUILD ?= 0
|
||||
|
||||
# Enable -no-pie linker option
|
||||
NO_PIE ?= 1
|
||||
|
||||
# Specify the target you are building for, TARGET_BITS=0 means native
|
||||
TARGET_ARCH ?= native
|
||||
TARGET_BITS ?= 0
|
||||
|
@ -654,9 +657,13 @@ else ifeq ($(LEGACY_OSX_BUILD),1)
|
|||
LDFLAGS := -lm $(BACKEND_LDFLAGS) -fno-pie -lpthread
|
||||
|
||||
else
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -no-pie -lpthread
|
||||
LDFLAGS := $(BITS) -march=$(TARGET_ARCH) -lm $(BACKEND_LDFLAGS) -lpthread -ldl
|
||||
ifeq ($(NO_PIE), 1)
|
||||
LDFLAGS += -no-pie
|
||||
endif
|
||||
|
||||
ifeq ($(DISCORDRPC),1)
|
||||
LDFLAGS += -ldl -Wl,-rpath .
|
||||
LDFLAGS += -Wl,-rpath .
|
||||
endif
|
||||
|
||||
endif # End of LDFLAGS
|
||||
|
|
|
@ -89,13 +89,6 @@ static void controller_sdl_bind(void) {
|
|||
}
|
||||
|
||||
static void controller_sdl_init(void) {
|
||||
if (SDL_Init(SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS) != 0) {
|
||||
fprintf(stderr, "SDL init error: %s\n", SDL_GetError());
|
||||
return;
|
||||
}
|
||||
|
||||
haptics_enabled = (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0);
|
||||
|
||||
// try loading an external gamecontroller mapping file
|
||||
uint64_t gcsize = 0;
|
||||
void *gcdata = fs_load_file("gamecontrollerdb.txt", &gcsize);
|
||||
|
@ -109,6 +102,13 @@ static void controller_sdl_init(void) {
|
|||
free(gcdata);
|
||||
}
|
||||
|
||||
if (SDL_Init(SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS) != 0) {
|
||||
fprintf(stderr, "SDL init error: %s\n", SDL_GetError());
|
||||
return;
|
||||
}
|
||||
|
||||
haptics_enabled = (SDL_InitSubSystem(SDL_INIT_HAPTIC) == 0);
|
||||
|
||||
#ifdef BETTERCAMERA
|
||||
if (newcam_mouse == 1)
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
|
|
Loading…
Reference in New Issue