diff options
| author | Sonicadvance1 <sonicadvance1@gmail.com> | 2010-04-01 02:59:40 +0000 |
|---|---|---|
| committer | Sonicadvance1 <sonicadvance1@gmail.com> | 2010-04-01 02:59:40 +0000 |
| commit | d2cee0a869489414c46b4349deff7487d9b5d56f (patch) | |
| tree | ed0daaf88b93b9dc4cf93d321e9f3a29cf34ce9e /Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp | |
| parent | ca3f4a6494806cc1c5b20c3250ff6746fd3f64e3 (diff) | |
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
Diffstat (limited to 'Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp index 4b0dc358ee..9649fd6bfe 100644 --- a/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Plugins/Plugin_GCPadNew/Src/ControllerInterface/ControllerInterface.cpp @@ -12,6 +12,7 @@ #ifdef CIFACE_USE_SDL
#include "SDL/SDL.h"
#endif
+#include "Thread.h"
//#define MAX_DOUBLE_TAP_TIME 400
//#define MAX_HOLD_DOWN_TIME 400
@@ -488,8 +489,9 @@ bool ControllerInterface::InputReference::Detect( const unsigned int ms, const u while ( (time < ms) && (detected.size() < count) )
{
device->UpdateInput();
- std::vector<Device::Input*>::const_iterator i = device->Inputs().begin(),
- e = device->Inputs().end();
+ i = device->Inputs().begin();
+ e = device->Inputs().end();
+
for ( unsigned int n=0;i != e; ++i,++n )
{
if ( device->GetInputState( *i ) > INPUT_DETECT_THRESHOLD )
@@ -501,7 +503,7 @@ bool ControllerInterface::InputReference::Detect( const unsigned int ms, const u else
states[n] = false;
}
- wxMilliSleep( 10 ); time += 10;
+ Common::SleepCurrentThread( 10 ); time += 10;
}
delete states;
@@ -513,10 +515,10 @@ bool ControllerInterface::InputReference::Detect( const unsigned int ms, const u if ( controls.size() > 1 )
{
control_qualifier.name = '|';
- std::vector<Device::Control*>::const_iterator i = controls.begin(),
- e = controls.end();
- for ( ; i!=e; ++i )
- control_qualifier.name += (*i)->GetName() + '|';
+ std::vector<Device::Control*>::const_iterator c_i = controls.begin(),
+ c_e = controls.end();
+ for ( ; c_i != c_e; ++c_i )
+ control_qualifier.name += (*c_i)->GetName() + '|';
}
else
control_qualifier.FromControl( controls[0] );
@@ -546,7 +548,7 @@ bool ControllerInterface::OutputReference::Detect( const unsigned int ms, const while ( ms > ( slept += 10 ) )
{
device->UpdateOutput();
- wxMilliSleep( 10 );
+ Common::SleepCurrentThread( 10 );
}
State( 0 );
|
