version 1.4 | | version 1.5 |
---|
| | |
ubyte joystick_read_raw_axis (ubyte mask, int *axes) { | | ubyte joystick_read_raw_axis (ubyte mask, int *axes) { |
int i; | | int i; |
| | |
| | if (!joy_installed) return 0; |
j_Update_state(); | | j_Update_state(); |
| | |
for (i = 0; i <= j_num_axes; i++) { | | for (i = 0; i <= j_num_axes; i++) { |
| | |
| | |
| | |
int joy_get_button_state (int btn) { | | int joy_get_button_state (int btn) { |
| | if (!joy_installed) return 0; |
if(btn >= j_num_buttons) | | if(btn >= j_num_buttons) |
return 0; | | return 0; |
j_Update_state (); | | j_Update_state (); |
| | |
int joy_get_button_down_cnt (int btn) { | | int joy_get_button_down_cnt (int btn) { |
int downcount; | | int downcount; |
| | |
| | if (!joy_installed) return 0; |
j_Update_state (); | | j_Update_state (); |
| | |
downcount = j_button[btn].downcount; | | downcount = j_button[btn].downcount; |
| | |
//changed 6/24/99 to finally squish the timedown bug - Owen Evans | | //changed 6/24/99 to finally squish the timedown bug - Owen Evans |
fix joy_get_button_down_time(int btn) { | | fix joy_get_button_down_time(int btn) { |
fix downtime; | | fix downtime; |
| | if (!joy_installed) return 0; |
j_Update_state (); | | j_Update_state (); |
| | |
if (j_button[btn].state) { | | if (j_button[btn].state) { |