//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#include <jsinput.h>
+#include "jsinput.h"
jsInput::jsInput(jsSuper *j) {
jss=j;
jsInput::~jsInput(void) {}
-int jsInput::getInput(void){
+int jsInput::getInput(){
bool gotit=false;
int i, current_button = 0, button_bits = 0;
joystick=axis=button=-1;
+ axis_positive=false;
if(pretty_display) {
printf ( "+----------------------------------------------\n" ) ;
gotit=true;
joystick=jss->getCurrentJoystickId();
axis=i;
+ axis_positive=(delta>0);
} else if( current_button != 0 ) {
gotit=true;
joystick=jss->getCurrentJoystickId();
ulMilliSecondSleep(1);
}
-#if 0
if(button_bits != 0) {
- for(int i=1;i<=31;i++) {
+ for(int i=0;i<=31;i++) {
if( ( button_bits & (1 << i) ) > 0 ) {
button=i;
break;
}
}
}
-#else
- button = button_bits;
-#endif
return 0;
}