[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37524] branches/merwin-spacenav/intern/ ghost/intern/GHOST_NDOFManager.cpp: fixed typos, renamed the HID -> function lookup tables
Mike Erwin
significant.bit at gmail.com
Wed Jun 15 21:57:11 CEST 2011
Revision: 37524
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37524
Author: merwin
Date: 2011-06-15 19:57:10 +0000 (Wed, 15 Jun 2011)
Log Message:
-----------
fixed typos, renamed the HID -> function lookup tables
Modified Paths:
--------------
branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManager.cpp
Modified: branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManager.cpp
===================================================================
--- branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManager.cpp 2011-06-15 19:45:00 UTC (rev 37523)
+++ branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManager.cpp 2011-06-15 19:57:10 UTC (rev 37524)
@@ -30,7 +30,7 @@
-const char* ndof_button_names[] = {
+static const char* ndof_button_names[] = {
// used internally, never sent
"NDOF_BUTTON_NONE",
// these two are available from any 3Dconnexion device
@@ -72,13 +72,13 @@
"NDOF_BUTTON_10",
};
-const NDOF_ButtonT SpaceNavigator_HID_to_function[2] =
+static const NDOF_ButtonT SpaceNavigator_HID_map[2] =
{
NDOF_BUTTON_MENU,
NDOF_BUTTON_FIT
};
-const NDOF_ButtonT SpaceExplorer_HID_to_function[16] =
+static const NDOF_ButtonT SpaceExplorer_HID_map[16] =
{
NDOF_BUTTON_1,
NDOF_BUTTON_2,
@@ -153,7 +153,7 @@
switch (m_deviceType)
{
case SpaceNavigator:
- sendButtonEvent(SpaceNavigator_HID_to_function[button_number], press, time, window);
+ sendButtonEvent(SpaceNavigator_HID_map[button_number], press, time, window);
break;
case SpaceExplorer:
switch (button_number)
@@ -171,12 +171,12 @@
sendKeyEvent(GHOST_kKeyLeftControl, press, time, window);
break;
default:
- sendButtonEvent(SpaceExplorer_HID_to_function[button_number], press, time, window);
+ sendButtonEvent(SpaceExplorer_HID_map[button_number], press, time, window);
}
break;
case SpacePilot:
- printf("button %d %s\n", button, press ? "pressed" : "released");
- // sendButtonEvent(SpacePilot_HID_to_function(button_number), press, time, window);
+ printf("button %d %s\n", button_number, press ? "pressed" : "released");
+ // sendButtonEvent(SpacePilot_HID_map[button_number], press, time, window);
break;
}
More information about the Bf-blender-cvs
mailing list