Clean up of new Plugin, get it compiling in Linux/OSX, Linux side, you need to add the Xlib portion to SConscript

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5258 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2010-04-01 02:59:40 +00:00
parent ca3f4a6494
commit d2cee0a869
12 changed files with 66 additions and 21 deletions

View File

@ -23,8 +23,8 @@ void Init( std::vector<ControllerInterface::Device*>& devices )
// joysticks
for( int i = 0; i < SDL_NumJoysticks(); ++i )
{
SDL_Joystick* dev;
if ( dev = SDL_JoystickOpen( i ) )
SDL_Joystick* dev = SDL_JoystickOpen( i );
if ( dev )
{
Joystick* js = new Joystick( dev, i );
// only add if it has some inputs/outputs
@ -60,9 +60,9 @@ Joystick::Joystick( SDL_Joystick* const joystick, const unsigned int index ) : m
inputs.push_back( new Axis( i, -32768 ) );
inputs.push_back( new Axis( i, 32767 ) );
}
m_haptic = SDL_HapticOpenFromJoystick( m_joystick );
// try to get supported ff effects
if ( m_haptic = SDL_HapticOpenFromJoystick( m_joystick ) )
if ( m_haptic )
{
//SDL_HapticSetGain( m_haptic, 1000 );