Replace hardcoded max number of touches with a define.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
Peter Hutterer
2012-04-10 13:03:35 +10:00
parent 3f9794a8a0
commit 8e297cb586
2 changed files with 2 additions and 1 deletions

View File

@@ -1186,7 +1186,7 @@ DeviceInitTouch(DeviceIntPtr dev, Atom *axes_labels)
if (priv->has_touch)
{
priv->num_slots = priv->max_touches ? priv->max_touches : 10;
priv->num_slots = priv->max_touches ? priv->max_touches : SYNAPTICS_MAX_TOUCHES;
priv->open_slots = malloc(priv->num_slots * sizeof(int));
if (!priv->open_slots)

View File

@@ -49,6 +49,7 @@
* structs, typedefs, #defines, enums
*****************************************************************************/
#define SYNAPTICS_MOVE_HISTORY 5
#define SYNAPTICS_MAX_TOUCHES 10
typedef struct _SynapticsMoveHist
{