diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-21 17:07:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-21 17:07:59 +0300 |
commit | 11204fce4e19f273eea3e74a215823b7d9917c7a (patch) | |
tree | 32077d4969882624109566db9efe27cb0484c401 /source/gameengine/GameLogic/Joystick | |
parent | 4d67034076f58905f03d947af7cfe3455b4f33ab (diff) |
Fix strict compiler warning in BGE when linking directly to SDL
Diffstat (limited to 'source/gameengine/GameLogic/Joystick')
-rw-r--r-- | source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp index 1a66b2aee52..9f532527a80 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp @@ -38,7 +38,11 @@ #include "BLI_path_util.h" #ifdef WITH_SDL -# define SDL_CHECK(x) ((x) != (void *)0) +# ifdef WITH_SDL_DYNLOAD +# define SDL_CHECK(x) ((x) != (void *)0) +# else +# define SDL_CHECK(x) true +# endif #endif SCA_Joystick::SCA_Joystick(short int index) diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index fd3d713b3d2..1dee1de9de2 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -82,9 +82,11 @@ void SCA_Joystick::HandleEvents(void) { SDL_Event sdl_event; +#ifdef WITH_SDL_DYNLOAD if (SDL_PollEvent == (void*)0) { return; } +#endif int i; for (i=0; i<m_joynum; i++) { /* could use JOYINDEX_MAX but no reason to */ |