From 48283c0ac779fbb76e1aae22d1b8103f417f5ade Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 10 Aug 2015 15:09:27 +0200 Subject: [PATCH] Remove the C++11 requirement for now. It's better to keep it C++98 for another release, afterwards there can be a proper migration to C++11. --- Makefile | 1 - Makefile.windows | 2 +- src/CJoystick.cpp | 7 +++++-- src/init.cpp | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4d1e107..3e69cbf 100755 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ LOCALEDIR ?= $(PREFIX)/share/locale/ MEDAL_SERVER_HOST = www.parallelrealities.co.uk MEDAL_SERVER_PORT = 80 -CXXFLAGS += -std=c++11 CXXFLAGS += `pkg-config --cflags sdl2 SDL2_mixer SDL2_image SDL2_ttf SDL2_net` -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK) CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\"$(DATADIR)\" -DUNIX -DGAMEPLAYMANUAL=\"$(DOCDIR)index.html\" -Wall CXXFLAGS += -DLOCALEDIR=\"$(LOCALEDIR)\" -DMEDAL_SERVER_HOST=\"$(MEDAL_SERVER_HOST)\" -DMEDAL_SERVER_PORT=$(MEDAL_SERVER_PORT) diff --git a/Makefile.windows b/Makefile.windows index ec57cef..245b951 100755 --- a/Makefile.windows +++ b/Makefile.windows @@ -20,7 +20,7 @@ MEDAL_SERVER_PORT = 80 CXX = i686-w64-mingw32-g++ -CXXFLAGS += -std=c++11 -Dmain=SDL_main +CXXFLAGS += -Dmain=SDL_main CXXFLAGS += -I/your/mingw/include CXXFLAGS += -DVERSION=$(VERSION) -DRELEASE=$(RELEASE) -DUSEPAK=$(USEPAK) CXXFLAGS += -DPAKNAME=\"$(PAKNAME)\" -DPAKLOCATION=\"\" -DGAMEPLAYMANUAL=\"doc/index.html\" -Wall diff --git a/src/CJoystick.cpp b/src/CJoystick.cpp index 3a624d8..eb4623d 100644 --- a/src/CJoystick.cpp +++ b/src/CJoystick.cpp @@ -22,7 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h" Joystick::Joystick(): - sensitivity(25000), - control{-2, -2, -2, -2, 1, 0, 3, 7 ,6} + sensitivity(25000) { + static int defaultValue[CONTROL::MAX] = {-2, -2, -2, -2, 1, 0, 3, 7, 6}; + + for (int i = 0; i < CONTROL::MAX; i++) + control[i] = defaultValue[i]; } diff --git a/src/init.cpp b/src/init.cpp index 3c333cc..4376c41 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -293,7 +293,7 @@ void initSystem() } // Increase the size of the window if we have large desktop resolutions - SDL_DisplayMode displayMode{0}; + SDL_DisplayMode displayMode = {0}; SDL_GetDesktopDisplayMode(0, &displayMode); int w = graphics.screen->w; int h = graphics.screen->h; -- 2.39.5