Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-20 04:19:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-20 04:19:21 +0400
commit4512f10db981bdd9083bd6763fc993f2a162ac53 (patch)
treee5056a5d2e8ae92a5a91a009ac05ccf6244ba061 /source
parent5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 (diff)
misc edits
- rename define DISABLE_SDL --> WITH_SDL (which was already used in some places) - blenders interation preset was using orbit rather then turntable 3d view preference (different from factory defaults). - tagged some unused rna args.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/SConscript3
-rw-r--r--source/blender/blenlib/BLI_utildefines.h2
-rw-r--r--source/blender/makesdna/DNA_space_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_action.c3
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_boid.c2
-rw-r--r--source/blender/makesrna/intern/rna_curve.c2
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c3
-rw-r--r--source/blender/makesrna/intern/rna_rna.c6
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/makesrna/intern/rna_texture.c10
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/creator/CMakeLists.txt4
-rw-r--r--source/creator/creator.c4
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt4
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp44
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.h12
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp8
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h4
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickManager.cpp2
-rw-r--r--source/gameengine/GameLogic/SConscript3
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt3
-rw-r--r--source/gameengine/Ketsji/SConscript3
24 files changed, 65 insertions, 68 deletions
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 7d7ab56ec3f..512eec4021f 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -41,8 +41,7 @@ if env['WITH_BF_QUICKTIME']:
if env['WITH_BF_SDL']:
incs += ' ' + env['BF_SDL_INC']
-else:
- defs.append('DISABLE_SDL')
+ defs.append('WITH_SDL')
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 456ee72c4e0..b2b3e7381c6 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -221,7 +221,7 @@
# else
# define _dummy_abort() (void)0
# endif
-# ifdef __GNUC__ /* just want to check if __func__ is available */
+# if defined(__GNUC__) || defined(_MSC_VER) /* just want to check if __func__ is available */
# define BLI_assert(a) \
do { \
if (!(a)) { \
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 1627d4d2acb..13be1253184 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -434,7 +434,8 @@ typedef struct SpaceLogic {
struct bGPdata *gpd; /* grease-pencil data */
} SpaceLogic;
-
+/* note, this entire struct isnt used anymore!,
+ * may remove some day - campbell */
typedef struct SpaceImaSel {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 44c37f93b5e..f2d1578388d 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -132,7 +132,7 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, FCurve *
}
}
-static TimeMarker *rna_Action_pose_markers_new(bAction *act, ReportList *reports, const char name[])
+static TimeMarker *rna_Action_pose_markers_new(bAction *act, const char name[])
{
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag= 1;
@@ -550,7 +550,6 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
RNA_def_function_ui_description(func, "Add a pose marker to the action");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index d828139a6d5..2859a7bb89b 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -450,7 +450,7 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
return item;
}
-static void rna_Actuator_Armature_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Actuator_Armature_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
bActuator *act= (bActuator *)ptr->data;
bArmatureActuator *aa = act->data;
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 357f613f65f..e21f6aeb26f 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -76,7 +76,7 @@ EnumPropertyItem boidruleset_type_items[] ={
#include "BKE_depsgraph.h"
#include "BKE_particle.h"
-static void rna_Boids_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
if(ptr->type==&RNA_ParticleSystem) {
ParticleSystem *psys = (ParticleSystem*)ptr->data;
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index edae977f3f6..49f39a207d2 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -292,7 +292,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
Curve *cu= (Curve*)ptr->id.data;
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index ba90aca47a3..c114c44ad77 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -173,6 +173,7 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
{
#ifdef DISABLE_ELBEEM
+ (void)ptr;
value[0]= '\0';
#else
Object *ob= (Object*)ptr->id.data;
@@ -182,7 +183,7 @@ static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *v
#endif
}
-static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *ptr)
+static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *UNUSED(ptr))
{
#ifdef DISABLE_ELBEEM
return 0;
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 376b0c529d0..31c872f43f8 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -167,7 +167,7 @@ static int rna_idproperty_known(CollectionPropertyIterator *iter, void *data)
return 0;
}
-static int rna_property_builtin(CollectionPropertyIterator *iter, void *data)
+static int rna_property_builtin(CollectionPropertyIterator *UNUSED(iter), void *data)
{
PropertyRNA *prop= (PropertyRNA*)data;
@@ -176,7 +176,7 @@ static int rna_property_builtin(CollectionPropertyIterator *iter, void *data)
return (prop->flag & PROP_BUILTIN);
}
-static int rna_function_builtin(CollectionPropertyIterator *iter, void *data)
+static int rna_function_builtin(CollectionPropertyIterator *UNUSED(iter), void *data)
{
FunctionRNA *func= (FunctionRNA*)data;
@@ -775,7 +775,7 @@ static int rna_EnumProperty_default_get(PointerRNA *ptr)
return ((EnumPropertyRNA*)prop)->defaultvalue;
}
-static int rna_enum_check_separator(CollectionPropertyIterator *iter, void *data)
+static int rna_enum_check_separator(CollectionPropertyIterator *UNUSED(iter), void *data)
{
EnumPropertyItem *item= (EnumPropertyItem*)data;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ccc8151ac7f..09824616936 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1054,7 +1054,7 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons
* is not for general use and only for the few cases where changing scene
* settings and NOT for general purpose updates, possibly this should be
* given its own notifier. */
-static void rna_Scene_update_active_object_data(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Scene_update_active_object_data(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
Object *ob= OBACT;
if(ob) {
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8afcd61b9c8..cbe06e6cab5 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -860,7 +860,7 @@ static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value)
return (ntree->nodetype==0 && ntree->type == snode->treetype);
}
-static void rna_SpaceNodeEditor_node_tree_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_SpaceNodeEditor_node_tree_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
SpaceNode *snode= (SpaceNode*)ptr->data;
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index b5e8acb76e5..03f0a4ba363 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -133,7 +133,7 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
}
}
-static void rna_Texture_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Texture_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
@@ -162,7 +162,7 @@ static void rna_Texture_voxeldata_image_update(Main *bmain, Scene *scene, Pointe
/* Used for Texture Properties, used (also) for/in Nodes */
-static void rna_Texture_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
@@ -177,7 +177,7 @@ static void rna_Texture_type_set(PointerRNA *ptr, int value)
tex_set_type(tex, value);
}
-void rna_TextureSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id= ptr->id.data;
@@ -388,12 +388,12 @@ static void rna_PointDensity_psys_set(PointerRNA *ptr, PointerRNA value)
pd->psys= BLI_findindex(&ob->particlesystem, value.data) + 1;
}
-static char *rna_PointDensity_path(PointerRNA *ptr)
+static char *rna_PointDensity_path(PointerRNA *UNUSED(ptr))
{
return BLI_sprintfN("point_density");
}
-static char *rna_VoxelData_path(PointerRNA *ptr)
+static char *rna_VoxelData_path(PointerRNA *UNUSED(ptr))
{
return BLI_sprintfN("voxel_data");
}
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e2f0f4dab1f..9202647981b 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -72,7 +72,7 @@ static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
WM_main_add_notifier(NC_WINDOW, NULL);
}
-static void rna_userdef_dpi_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_userdef_dpi_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
U.widget_unit = (U.dpi * 20 + 36)/72;
WM_main_add_notifier(NC_WINDOW, NULL); /* full redraw */
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index e7a1ff14f03..b4e9d4d262e 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -88,8 +88,8 @@ if(WITH_GAMEENGINE)
add_definitions(-DWITH_GAMEENGINE)
endif()
-if(NOT WITH_SDL)
- add_definitions(-DDISABLE_SDL)
+if(WITH_SDL)
+ add_definitions(-DWITH_SDL)
endif()
if(WITH_BINRELOC)
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 3ce469de4e8..f6b99a9f73c 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -305,7 +305,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
#else
printf (" $TMP or $TMPDIR Store temporary files here.\n");
#endif
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
printf (" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, dma.\n");
#endif
printf (" $PYTHONHOME Path to the python directory, eg. /usr/lib/python.\n\n");
@@ -1213,7 +1213,7 @@ int main(int argc, const char **argv)
/* this is properly initialized with user defs, but this is default */
BLI_where_is_temp(btempdir, FILE_MAX, 1); /* call after loading the startup.blend so we can read U.tempdir */
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
BLI_setenv("SDL_VIDEODRIVER", "dummy");
#endif
}
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index bd417165337..9a57de60517 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -131,8 +131,8 @@ if(WITH_SDL)
list(APPEND INC_SYS
${SDL_INCLUDE_DIR}
)
-else()
- add_definitions(-DDISABLE_SDL)
+
+ add_definitions(-DWITH_SDL)
endif()
blender_add_lib(ge_logic "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index 48ba09e67d2..0547d97285d 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -29,8 +29,8 @@
* \ingroup gamelogic
*/
-#ifndef DISABLE_SDL
-#include <SDL.h>
+#ifdef WITH_SDL
+# include <SDL.h>
#endif
#include <stdio.h>
@@ -57,7 +57,7 @@ SCA_Joystick::SCA_Joystick(short int index)
for(int i=0; i<JOYHAT_MAX; i++)
m_hat_array[i]= 0;
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
m_private = new PrivateData();
#endif
}
@@ -66,7 +66,7 @@ SCA_Joystick::SCA_Joystick(short int index)
SCA_Joystick::~SCA_Joystick()
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
delete m_private;
#endif
}
@@ -77,9 +77,9 @@ int SCA_Joystick::m_refCount = 0;
SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
{
-#ifdef DISABLE_SDL
+#ifndef WITH_SDL
return NULL;
-#else
+#else /* WITH_SDL */
if (joyindex < 0 || joyindex >= JOYINDEX_MAX) {
echo("Error-invalid joystick index: " << joyindex);
return NULL;
@@ -107,14 +107,14 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
m_refCount++;
}
return m_instance[joyindex];
-#endif
+#endif /* WITH_SDL */
}
void SCA_Joystick::ReleaseInstance()
{
if (--m_refCount == 0)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
int i;
for (i=0; i<JOYINDEX_MAX; i++) {
if (m_instance[i]) {
@@ -125,7 +125,7 @@ void SCA_Joystick::ReleaseInstance()
}
SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
-#endif
+#endif /* WITH_SDL */
}
}
@@ -163,7 +163,7 @@ bool SCA_Joystick::aAxisIsPositive(int axis_single)
bool SCA_Joystick::aAnyButtonPressIsPositive(void)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
/* this is needed for the "all events" option
* so we know if there are no buttons pressed */
for (int i=0; i<m_buttonmax; i++)
@@ -175,7 +175,7 @@ bool SCA_Joystick::aAnyButtonPressIsPositive(void)
bool SCA_Joystick::aButtonPressIsPositive(int button)
{
-#ifdef DISABLE_SDL
+#ifndef WITH_SDL
return false;
#else
bool result;
@@ -187,7 +187,7 @@ bool SCA_Joystick::aButtonPressIsPositive(int button)
bool SCA_Joystick::aButtonReleaseIsPositive(int button)
{
-#ifdef DISABLE_SDL
+#ifndef WITH_SDL
return false;
#else
bool result;
@@ -221,11 +221,11 @@ int SCA_Joystick::GetNumberOfHats()
bool SCA_Joystick::CreateJoystickDevice(void)
{
-#ifdef DISABLE_SDL
+#ifndef WITH_SDL
m_isinit = true;
m_axismax = m_buttonmax = m_hatmax = 0;
return false;
-#else
+#else /* WITH_SDL */
if(m_isinit == false){
if (m_joyindex>=m_joynum) {
// don't print a message, because this is done anyway
@@ -257,13 +257,13 @@ bool SCA_Joystick::CreateJoystickDevice(void)
}
return true;
-#endif
+#endif /* WITH_SDL */
}
void SCA_Joystick::DestroyJoystickDevice(void)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
if (m_isinit){
if(SDL_JoystickOpened(m_joyindex)){
echo("Closing-joystick " << m_joyindex);
@@ -271,12 +271,12 @@ void SCA_Joystick::DestroyJoystickDevice(void)
}
m_isinit = false;
}
-#endif
+#endif /* WITH_SDL */
}
int SCA_Joystick::Connected(void)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
if (m_isinit && SDL_JoystickOpened(m_joyindex))
return 1;
#endif
@@ -285,7 +285,7 @@ int SCA_Joystick::Connected(void)
int SCA_Joystick::pGetAxis(int axisnum, int udlr)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
return m_axis_array[(axisnum*2)+udlr];
#endif
return 0;
@@ -293,7 +293,7 @@ int SCA_Joystick::pGetAxis(int axisnum, int udlr)
int SCA_Joystick::pAxisTest(int axisnum)
{
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
short i1= m_axis_array[(axisnum*2)];
short i2= m_axis_array[(axisnum*2)+1];
@@ -304,7 +304,7 @@ int SCA_Joystick::pAxisTest(int axisnum)
if (i2 < 0) i2 = -i2;
if (i1 <i2) return i2;
else return i1;
-#else
+#else /* WITH_SDL */
return 0;
-#endif
+#endif /* WITH_SDL */
}
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
index f371955ffc6..4e3e3ef656d 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
@@ -33,8 +33,8 @@
#define _SCA_JOYSTICK_H_
#include "SCA_JoystickDefines.h"
-#ifndef DISABLE_SDL
-#include "SDL.h"
+#ifdef WITH_SDL
+# include "SDL.h"
#endif
/**
@@ -52,7 +52,7 @@ class SCA_Joystick
static int m_refCount;
class PrivateData;
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
PrivateData *m_private;
#endif
int m_joyindex;
@@ -89,7 +89,7 @@ class SCA_Joystick
bool m_istrig_button;
bool m_istrig_hat;
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
/**
* event callbacks
*/
@@ -102,7 +102,7 @@ class SCA_Joystick
void OnBallMotion(SDL_Event *sdl_event){}
#endif
-#endif
+#endif /* WITH_SDL */
/**
* Open the joystick
*/
@@ -193,7 +193,7 @@ public:
*/
int Connected(void);
};
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
void Joystick_HandleEvents( void );
#endif
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
index b6e313aa6c2..e1ab364ae67 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
@@ -29,15 +29,15 @@
* \ingroup gamelogic
*/
-#ifndef DISABLE_SDL
-#include <SDL.h>
+#ifdef WITH_SDL
+# include <SDL.h>
#endif
#include "SCA_Joystick.h"
#include "SCA_JoystickPrivate.h"
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
void SCA_Joystick::OnAxisMotion(SDL_Event* sdl_event)
{
if(sdl_event->jaxis.axis >= JOYAXIS_MAX)
@@ -125,4 +125,4 @@ void SCA_Joystick::HandleEvents(void)
}
}
}
-#endif
+#endif /* WITH_SDL */
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h b/source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h
index 02dd8145bb7..472a7353190 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickPrivate.h
@@ -33,7 +33,7 @@
#define __SCA_JOYSTICKPRIVATE_H__
#include "SCA_Joystick.h"
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
class SCA_Joystick::PrivateData
{
public:
@@ -47,6 +47,6 @@ public:
{
}
};
-#endif
+#endif /* WITH_SDL */
#endif
diff --git a/source/gameengine/GameLogic/SCA_JoystickManager.cpp b/source/gameengine/GameLogic/SCA_JoystickManager.cpp
index b61e4f4edca..2942384055b 100644
--- a/source/gameengine/GameLogic/SCA_JoystickManager.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickManager.cpp
@@ -65,7 +65,7 @@ void SCA_JoystickManager::NextFrame(double curtime,double deltatime)
}
else {
;
-#ifndef DISABLE_SDL
+#ifdef WITH_SDL
SCA_Joystick::HandleEvents(); /* Handle all SDL Joystick events */
#endif
SG_DList::iterator<SCA_JoystickSensor> it(m_sensors);
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index d6323882267..62bdbc29544 100644
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -10,9 +10,8 @@ incs += ' #/source/gameengine/Rasterizer #/source/gameengine/SceneGraph'
defs = []
if env['WITH_BF_SDL']:
+ defs.append('WITH_SDL')
incs += ' ' + env['BF_SDL_INC']
-else:
- defs.append('DISABLE_SDL')
if env['WITH_BF_PYTHON']:
incs += ' ' + env['BF_PYTHON_INC']
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 9d8b1781869..329ac890cd2 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -225,8 +225,7 @@ if(WITH_SDL)
list(APPEND INC_SYS
${SDL_INCLUDE_DIR}
)
-else()
- add_definitions(-DDISABLE_SDL)
+ add_definitions(-DWITH_SDL)
endif()
if(WITH_CODEC_FFMPEG)
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 9b453ed76d5..064f09df9f3 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -27,8 +27,7 @@ incs += ' ' + env['BF_OPENGL_INC']
if env['WITH_BF_SDL']:
incs += ' ' + env['BF_SDL_INC']
-else:
- defs.append('DISABLE_SDL')
+ defs.append('WITH_SDL')
if env['WITH_BF_PYTHON']:
incs += ' ' + env['BF_PYTHON_INC']