diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-07 18:15:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-07 18:15:34 +0300 |
commit | f86a584d8f19a06d06acaef3ad1f9d3eef4690ad (patch) | |
tree | 0c8574417ea7b77bb464e93e3395b95178e3d94f /src | |
parent | f29d4876505fd3fd8c5d2c115e2a790409b02289 (diff) | |
download | mv-f86a584d8f19a06d06acaef3ad1f9d3eef4690ad.tar.gz mv-f86a584d8f19a06d06acaef3ad1f9d3eef4690ad.tar.bz2 mv-f86a584d8f19a06d06acaef3ad1f9d3eef4690ad.tar.xz mv-f86a584d8f19a06d06acaef3ad1f9d3eef4690ad.zip |
Fix compilation with SDL2.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/keyboardconfig.h | 2 | ||||
-rw-r--r-- | src/logger.h | 4 | ||||
-rw-r--r-- | src/net/sdltcpnet.h | 4 | ||||
-rw-r--r-- | src/resources/screenshothelper.h | 4 | ||||
-rw-r--r-- | src/soundmanager.h | 12 | ||||
-rw-r--r-- | src/utils/buildhex.h | 4 | ||||
-rw-r--r-- | src/utils/physfsrwops.h | 4 | ||||
-rw-r--r-- | src/utils/sdl2helper.h | 4 |
8 files changed, 20 insertions, 18 deletions
diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h index 31cae27bb..b022ad13d 100644 --- a/src/input/keyboardconfig.h +++ b/src/input/keyboardconfig.h @@ -23,6 +23,8 @@ #ifndef INPUT_KEYBOARDCONFIG_H #define INPUT_KEYBOARDCONFIG_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") diff --git a/src/logger.h b/src/logger.h index 557116df2..aafe50428 100644 --- a/src/logger.h +++ b/src/logger.h @@ -23,6 +23,8 @@ #ifndef LOGGER_H #define LOGGER_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -39,8 +41,6 @@ PRAGMA45(GCC diagnostic pop) #include <fstream> #include <vector> -#include "localconsts.h" - #ifdef ENABLEDEBUGLOG #define DEBUGLOG(str) \ if (logger && !mIgnore) \ diff --git a/src/net/sdltcpnet.h b/src/net/sdltcpnet.h index 9469b7768..dda5f0aec 100644 --- a/src/net/sdltcpnet.h +++ b/src/net/sdltcpnet.h @@ -21,6 +21,8 @@ #ifndef NET_SDLTCPNET_H #define NET_SDLTCPNET_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -35,8 +37,6 @@ PRAGMA45(GCC diagnostic pop) #include <SDL_net.h> -#include "localconsts.h" - namespace TcpNet { typedef ::SDLNet_SocketSet SocketSet; diff --git a/src/resources/screenshothelper.h b/src/resources/screenshothelper.h index 5f525c03c..6ae396cd0 100644 --- a/src/resources/screenshothelper.h +++ b/src/resources/screenshothelper.h @@ -23,6 +23,8 @@ #ifndef RESOURCES_SCREENSHOTHELPER_H #define RESOURCES_SCREENSHOTHELPER_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -37,8 +39,6 @@ PRAGMA45(GCC diagnostic pop) #include <SDL_video.h> -#include "localconsts.h" - class ScreenshotHelper notfinal { public: diff --git a/src/soundmanager.h b/src/soundmanager.h index 5ac79a815..ae17552e8 100644 --- a/src/soundmanager.h +++ b/src/soundmanager.h @@ -23,6 +23,12 @@ #ifndef SOUNDMANAGER_H #define SOUNDMANAGER_H +#include "enums/simpletypes/skiperror.h" + +#include "listeners/configlistener.h" + +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -36,12 +42,6 @@ PRAGMA45(GCC diagnostic pop) #endif // USE_SDL2 #include <SDL_mixer.h> -#include "enums/simpletypes/skiperror.h" - -#include "listeners/configlistener.h" - -#include "localconsts.h" - class SDLMusic; /** SoundManager diff --git a/src/utils/buildhex.h b/src/utils/buildhex.h index 3ee72d28c..39a9aa817 100644 --- a/src/utils/buildhex.h +++ b/src/utils/buildhex.h @@ -21,6 +21,8 @@ #ifndef UTILS_BUILDHEX_H #define UTILS_BUILDHEX_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -37,8 +39,6 @@ PRAGMA45(GCC diagnostic pop) #include <SDL_endian.h> #endif // SDL_BYTEORDER -#include "localconsts.h" - #if SDL_BYTEORDER == SDL_BIG_ENDIAN #define buildHex(a, b, c, d) \ (d) * 16777216U + (c) * 65536U + (b) * 256U + CAST_U32(a) diff --git a/src/utils/physfsrwops.h b/src/utils/physfsrwops.h index f3eefe0a5..b72c5969d 100644 --- a/src/utils/physfsrwops.h +++ b/src/utils/physfsrwops.h @@ -25,6 +25,8 @@ #ifndef UTILS_PHYSFSRWOPS_H #define UTILS_PHYSFSRWOPS_H +#include "localconsts.h" + #ifdef USE_SDL2 PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") @@ -40,8 +42,6 @@ PRAGMA45(GCC diagnostic pop) #include "utils/physfstools.h" -#include "localconsts.h" - /** * Open a platform-independent filename for reading, and make it accessible * via an SDL_RWops structure. The file will be closed in PhysicsFS when the diff --git a/src/utils/sdl2helper.h b/src/utils/sdl2helper.h index 412701a02..9be1c25e5 100644 --- a/src/utils/sdl2helper.h +++ b/src/utils/sdl2helper.h @@ -24,6 +24,8 @@ #ifdef USE_SDL2 #include "utils/stringvector.h" +#include "localconsts.h" + PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-default") #include <SDL_stdinc.h> @@ -34,8 +36,6 @@ PRAGMA45(GCC diagnostic ignored "-Wswitch-default") PRAGMA45(GCC diagnostic pop) #include <SDL_thread.h> -#include "localconsts.h" - struct SDL_Surface; struct SDL_SysWMinfo; struct SDL_Window; |