Merge branch 'master' into blender2.8

This commit is contained in:
2017-07-21 16:08:31 +02:00
3 changed files with 10 additions and 1 deletions

View 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}")

View File

@@ -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)

View 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 */