From 0ed2c90da97012f5ff897c9a87b2fc9ee57eb38f Mon Sep 17 00:00:00 2001 From: Eukara Date: Sat, 24 Jul 2021 14:24:46 +0000 Subject: [PATCH] Unbreak xinput, don't use -O3 for release builds as GCC creates abrasive code, fix plugins-rel putting CFLAGS into the CC/CXX line git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5993 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/Makefile | 6 +++--- engine/client/in_win.c | 4 ++-- plugins/Makefile | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/Makefile b/engine/Makefile index 1e7e3a18..38245e9c 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -29,7 +29,7 @@ STRIP?=strip STRIPFLAGS=--strip-unneeded --remove-section=.comment -CPUOPTIMIZATIONS= +CPUOPTIMIZATIONS=-Os COMPILE_SYS:=$(shell uname -o 2>&1) @@ -637,7 +637,7 @@ SERVER_ONLY_CFLAGS=-DSERVERONLY JOINT_CFLAGS= DEBUG_CFLAGS?=-ggdb -g DEBUG_CFLAGS+=-DDEBUG -RELEASE_CFLAGS?=-O3 $(CPUOPTIMIZATIONS) +RELEASE_CFLAGS?=$(CPUOPTIMIZATIONS) # #note: RELEASE_CFLAGS used to contain -ffast-math #however, its use resulted in the player getting stuck etc, so be warned if you try re-enabling it. @@ -2104,7 +2104,7 @@ plugins: plugins-rel: @-mkdir -p $(RELEASE_DIR) @if test -e ../plugins/Makefile; \ - then $(MAKE) native -C ../plugins OUT_DIR="$(RELEASE_DIR)" CC="$(CC) $(W32_CFLAGS) $(RELEASE_CFLAGS)" CXX="$(CXX) $(W32_CFLAGS) $(subst -Wno-pointer-sign,,$(RELEASE_CFLAGS))" PKGCONFIG="$(PKGCONFIG)" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS) $(BRANDFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS)) $(BRANDFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \ + then $(MAKE) native -C ../plugins OUT_DIR="$(RELEASE_DIR)" CC="$(CC)" CXX="$(CXX)" PKGCONFIG="$(PKGCONFIG)" ARCH="$(ARCH)" BASE_CFLAGS="$(BASE_CFLAGS) $(BRANDFLAGS)" BASE_CXXFLAGS="$(subst -Wno-pointer-sign,,$(BASE_CFLAGS)) $(BRANDFLAGS)" FTE_TARGET="$(FTE_TARGET)"; \ else echo no plugins directory installed; \ fi plugins-rel: diff --git a/engine/client/in_win.c b/engine/client/in_win.c index e518637d..fc62ad6c 100644 --- a/engine/client/in_win.c +++ b/engine/client/in_win.c @@ -318,8 +318,8 @@ static const int xinputjbuttons[] = K_GP_DPAD_RIGHT, K_GP_START, K_GP_BACK, - K_GP_LEFT_THUMB, - K_GP_RIGHT_THUMB, + K_GP_LEFT_STICK, + K_GP_RIGHT_STICK, K_GP_LEFT_SHOULDER, K_GP_RIGHT_SHOULDER, diff --git a/plugins/Makefile b/plugins/Makefile index fc6f45a0..17b50645 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -291,7 +291,7 @@ $(BULLET_BASE)bullet3-$(BULLET_VER)/lib/libBulletDynamics.a $(BULLET_BASE)bullet $(BULLET_LIB): $(OUT_DIR)/../bullet3-$(BULLET_VER).tar.gz $(CMAKERULES) mkdir -p $(BULLET_BASE) && cd $(BULLET_BASE) && tar xvfz $< rm $(BULLET_BASE)bullet3-$(BULLET_VER)/build3/cmake/FindPythonLibs.cmake #cmake is a pile of shite and fails at cross compiling. oh well, we didn't want any python stuff anyway. - cd $(BULLET_BASE)bullet3-$(BULLET_VER)/ && cmake $(subst -O3,,$(PLUG_CMAKE)) -DBUILD_DEMOS:BOOL=OFF -DBUILD_EXTRAS:BOOL=OFF -DLIBRARY_OUTPUT_PATH=$(BULLET_BASE)bullet3-$(BULLET_VER)/lib . && $(MAKE) LinearMath BulletDynamics BulletCollision + cd $(BULLET_BASE)bullet3-$(BULLET_VER)/ && cmake $(PLUG_CMAKE) -DBUILD_DEMOS:BOOL=OFF -DBUILD_EXTRAS:BOOL=OFF -DLIBRARY_OUTPUT_PATH=$(BULLET_BASE)bullet3-$(BULLET_VER)/lib . && $(MAKE) LinearMath BulletDynamics BulletCollision #./configure --enable-double-precision --disable-demos --without-x CXX="$(CC)" CFLAGS="$(PLUG_CFLAGS)" CXXFLAGS="$(PLUG_CXXFLAGS)" --host=`$(CC) -dumpmachine` && make