Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Jul 2017 14:08:31 +0000 (16:08 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 21 Jul 2017 14:08:31 +0000 (16:08 +0200)
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp

index 05071f5970738a9753aff36c6cdffe59d7e734ad..b9eec74f6f4dc172cd91693692600dc5fe801e69 100644 (file)
@@ -139,6 +139,9 @@ if(WITH_SDL)
        if(WITH_GHOST_SDL)
                add_definitions(-DWITH_GHOST_SDL)
        endif()
+       if(WITH_SDL_DYNLOAD)
+               add_definitions(-DWITH_SDL_DYNLOAD)
+       endif()
 endif()
 
 blender_add_lib(ge_logic "${SRC}" "${INC}" "${INC_SYS}")
index 1a66b2aee52b065c50948bfb9bf8b689360ff17c..9f532527a804c3e3a3677e8df6b37c340a5879d2 100644 (file)
 #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)
index fd3d713b3d24bb8052f9ec6d0cb8b696f055c281..1dee1de9de29ee4052dcb0239b69aa2b36ed3ece 100644 (file)
@@ -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 */