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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 01dc77127d2..77d74399769 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -567,6 +567,7 @@ void WM_event_print(const wmEvent *event)
BLI_str_utf8_size(event->utf8_buf), event->utf8_buf,
event->keymap_idname, (const void *)event);
+#ifdef WITH_INPUT_NDOF
if (ISNDOF(event->type)) {
const wmNDOFMotionData *ndof = event->customdata;
if (event->type == NDOF_MOTION) {
@@ -577,6 +578,7 @@ void WM_event_print(const wmEvent *event)
/* ndof buttons printed already */
}
}
+#endif /* WITH_INPUT_NDOF */
if (event->tablet_data) {
const wmTabletData *wmtab = event->tablet_data;
@@ -613,10 +615,12 @@ bool WM_event_is_absolute(const wmEvent *event)
return (event->tablet_data != NULL);
}
+#ifdef WITH_INPUT_NDOF
void WM_ndof_deadzone_set(float deadzone)
{
GHOST_setNDOFDeadZone(deadzone);
}
+#endif
static void wm_add_reports(ReportList *reports)
{
@@ -2423,9 +2427,11 @@ void wm_event_do_handlers(bContext *C)
/* for regions having custom cursors */
wm_paintcursor_test(C, event);
}
+#ifdef WITH_INPUT_NDOF
else if (event->type == NDOF_MOTION) {
win->addmousemove = true;
}
+#endif
for (sa = win->screen->areabase.first; sa; sa = sa->next) {
/* after restoring a screen from SCREENMAXIMIZED we have to wait
@@ -3026,6 +3032,7 @@ static void update_tablet_data(wmWindow *win, wmEvent *event)
}
}
+#ifdef WITH_INPUT_NDOF
/* adds customdata to event */
static void attach_ndof_data(wmEvent *event, const GHOST_TEventNDOFMotionData *ghost)
{
@@ -3052,6 +3059,7 @@ static void attach_ndof_data(wmEvent *event, const GHOST_TEventNDOFMotionData *g
event->customdata = data;
event->customdatafree = 1;
}
+#endif /* WITH_INPUT_NDOF */
/* imperfect but probably usable... draw/enable drags to other windows */
static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *win, wmEvent *event)
@@ -3439,6 +3447,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
break;
}
+#ifdef WITH_INPUT_NDOF
case GHOST_kEventNDOFMotion:
{
event.type = NDOF_MOTION;
@@ -3474,6 +3483,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
break;
}
+#endif /* WITH_INPUT_NDOF */
case GHOST_kEventUnknown:
case GHOST_kNumEventTypes:
@@ -3545,6 +3555,7 @@ void WM_set_locked_interface(wmWindowManager *wm, bool lock)
}
+#ifdef WITH_INPUT_NDOF
/* -------------------------------------------------------------------- */
/* NDOF */
@@ -3587,6 +3598,7 @@ void WM_event_ndof_to_quat(const struct wmNDOFMotionData *ndof, float q[4])
angle = WM_event_ndof_to_axis_angle(ndof, axis);
axis_angle_to_quat(q, axis, angle);
}
+#endif /* WITH_INPUT_NDOF */
/* if this is a tablet event, return tablet pressure and set *pen_flip
* to 1 if the eraser tool is being used, 0 otherwise */