Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2009, 11:16:34 PM (15 years ago)
Author:
rgrieder
Message:

Updated OIS library (still 1.2, but CVS version).
There have been some little fixes and support for force feedback on Linux (but this doesn't concern us for now…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/src/ois/linux/LinuxForceFeedback.h

    r1505 r5668  
    2626#include "linux/LinuxPrereqs.h"
    2727#include "OISForceFeedback.h"
     28#include <linux/input.h>
    2829
    2930namespace OIS
     
    3233        {
    3334        public:
    34                 LinuxForceFeedback();
     35                LinuxForceFeedback(int deviceID);
    3536                ~LinuxForceFeedback();
    3637
     
    5051                void remove( const Effect* effect );
    5152
    52                 /** FF is not yet implemented fully on Linux.. just retun 0 for now. todo, xxx */
    53                 short int getFFAxesNumber() { return 0; }
     53                /** FF is not yet implemented fully on Linux.. just return -1 for now. todo, xxx */
     54                short int getFFAxesNumber() { return -1; }
     55
     56                /** @copydoc ForceFeedback::getFFMemoryLoad */
     57                unsigned short getFFMemoryLoad();
     58
     59        protected:
     60
     61                //Sets the common properties to all effects
     62                void _setCommonProperties(struct ff_effect *event, struct ff_envelope *ffenvelope,
     63                                                                  const Effect* effect, const Envelope *envelope );
     64
     65                //Specific Effect Settings
     66                void _updateConstantEffect( const Effect* effect );
     67                void _updateRampEffect( const Effect* effect );
     68                void _updatePeriodicEffect( const Effect* effect );
     69                void _updateConditionalEffect( const Effect* effect );
     70                //void _updateCustomEffect( const Effect* effect );
     71
     72                void _upload( struct ff_effect* ffeffect, const Effect* effect);
     73                void _stop( int handle);
     74                void _start( int handle);
     75                void _unload( int handle);
     76
     77                // Map of currently uploaded effects (handle => effect)
     78                typedef std::map<int, struct ff_effect *> EffectList;
     79                EffectList mEffectList;
     80
     81                // Joystick device (file) descriptor.
     82                int mJoyStick;
    5483        };
    5584}
Note: See TracChangeset for help on using the changeset viewer.