diff include/SDL_haptic.h @ 2488:8e2bdbccf7ff gsoc2008_force_feedback

Added SDL_HapticUpdateEffect().
author Edgar Simo <bobbens@gmail.com>
date Tue, 01 Jul 2008 18:35:05 +0000
parents 4c8e25ef2d97
children 96adc8025331
line wrap: on
line diff
--- a/include/SDL_haptic.h	Tue Jul 01 16:42:12 2008 +0000
+++ b/include/SDL_haptic.h	Tue Jul 01 18:35:05 2008 +0000
@@ -241,6 +241,16 @@
 extern DECLSPEC int SDL_HapticNewEffect(SDL_Haptic * haptic, SDL_HapticEffect * effect);
 
 /*
+ * Uploads an effect.  Can be used dynamically, although behaviour when
+ * dynamically changing direction may be strange.  Specifically the effect
+ * may reupload itself and start playing from the start.  You cannot change
+ * the type either when running UpdateEffect.
+ *
+ * Returns the id of the effect on success, -1 on failure.
+ */
+extern DECLSPEC int SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data);
+
+/*
  * Runs the haptic effect on it's assosciated haptic device.
  *
  * Returns 0 on success or -1 on failure.