Timers are now 64-bit.
This commit is contained in:
@@ -49,52 +49,52 @@ static joystick_if_t *joystick_list[] =
|
||||
NULL
|
||||
};
|
||||
|
||||
char *joystick_get_name(int joystick)
|
||||
char *joystick_get_name(int64_t joystick)
|
||||
{
|
||||
if (!joystick_list[joystick])
|
||||
return NULL;
|
||||
return joystick_list[joystick]->name;
|
||||
}
|
||||
|
||||
int joystick_get_max_joysticks(int joystick)
|
||||
int64_t joystick_get_max_joysticks(int64_t joystick)
|
||||
{
|
||||
return joystick_list[joystick]->max_joysticks;
|
||||
}
|
||||
|
||||
int joystick_get_axis_count(int joystick)
|
||||
int64_t joystick_get_axis_count(int64_t joystick)
|
||||
{
|
||||
return joystick_list[joystick]->axis_count;
|
||||
}
|
||||
|
||||
int joystick_get_button_count(int joystick)
|
||||
int64_t joystick_get_button_count(int64_t joystick)
|
||||
{
|
||||
return joystick_list[joystick]->button_count;
|
||||
}
|
||||
|
||||
int joystick_get_pov_count(int joystick)
|
||||
int64_t joystick_get_pov_count(int64_t joystick)
|
||||
{
|
||||
return joystick_list[joystick]->pov_count;
|
||||
}
|
||||
|
||||
char *joystick_get_axis_name(int joystick, int id)
|
||||
char *joystick_get_axis_name(int64_t joystick, int64_t id)
|
||||
{
|
||||
return joystick_list[joystick]->axis_names[id];
|
||||
}
|
||||
|
||||
char *joystick_get_button_name(int joystick, int id)
|
||||
char *joystick_get_button_name(int64_t joystick, int64_t id)
|
||||
{
|
||||
return joystick_list[joystick]->button_names[id];
|
||||
}
|
||||
|
||||
char *joystick_get_pov_name(int joystick, int id)
|
||||
char *joystick_get_pov_name(int64_t joystick, int64_t id)
|
||||
{
|
||||
return joystick_list[joystick]->pov_names[id];
|
||||
}
|
||||
|
||||
typedef struct gameport_axis_t
|
||||
{
|
||||
int count;
|
||||
int axis_nr;
|
||||
int64_t count;
|
||||
int64_t axis_nr;
|
||||
struct gameport_t *gameport;
|
||||
} gameport_axis_t;
|
||||
|
||||
@@ -110,7 +110,7 @@ typedef struct gameport_t
|
||||
|
||||
static gameport_t *gameport_global = NULL;
|
||||
|
||||
static int gameport_time(int axis)
|
||||
static int64_t gameport_time(int64_t axis)
|
||||
{
|
||||
if (axis == AXIS_NOT_PRESENT)
|
||||
return 0;
|
||||
|
||||
@@ -30,14 +30,14 @@ extern device_t gameport_201_device;
|
||||
extern int joystick_type;
|
||||
|
||||
|
||||
extern char *joystick_get_name(int joystick);
|
||||
extern int joystick_get_max_joysticks(int joystick);
|
||||
extern int joystick_get_axis_count(int joystick);
|
||||
extern int joystick_get_button_count(int joystick);
|
||||
extern int joystick_get_pov_count(int joystick);
|
||||
extern char *joystick_get_axis_name(int joystick, int id);
|
||||
extern char *joystick_get_button_name(int joystick, int id);
|
||||
extern char *joystick_get_pov_name(int joystick, int id);
|
||||
extern char *joystick_get_name(int64_t joystick);
|
||||
extern int64_t joystick_get_max_joysticks(int64_t joystick);
|
||||
extern int64_t joystick_get_axis_count(int64_t joystick);
|
||||
extern int64_t joystick_get_button_count(int64_t joystick);
|
||||
extern int64_t joystick_get_pov_count(int64_t joystick);
|
||||
extern char *joystick_get_axis_name(int64_t joystick, int64_t id);
|
||||
extern char *joystick_get_button_name(int64_t joystick, int64_t id);
|
||||
extern char *joystick_get_pov_name(int64_t joystick, int64_t id);
|
||||
|
||||
extern void gameport_update_joystick_type(void);
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int poll_time;
|
||||
int poll_left;
|
||||
int poll_clock;
|
||||
int64_t poll_time;
|
||||
int64_t poll_left;
|
||||
int64_t poll_clock;
|
||||
uint64_t poll_data;
|
||||
int poll_mode;
|
||||
int64_t poll_mode;
|
||||
|
||||
int trigger_time;
|
||||
int data_mode;
|
||||
int64_t trigger_time;
|
||||
int64_t data_mode;
|
||||
} sw_data;
|
||||
|
||||
static void sw_timer_over(void *p)
|
||||
@@ -59,7 +59,7 @@ static void sw_timer_over(void *p)
|
||||
}
|
||||
|
||||
if (sw->poll_left == 1 && !sw->poll_clock)
|
||||
sw->poll_time += TIMER_USEC * 160;
|
||||
sw->poll_time += TIMER_USEC * 160LL;
|
||||
else if (sw->poll_left)
|
||||
sw->poll_time += TIMER_USEC * 5;
|
||||
else
|
||||
@@ -225,7 +225,7 @@ static int sw_read_axis(void *p, int axis)
|
||||
if (!JOYSTICK_PRESENT(0))
|
||||
return AXIS_NOT_PRESENT;
|
||||
|
||||
return 0; /*No analogue support on Sidewinder game pad*/
|
||||
return 0LL; /*No analogue support on Sidewinder game pad*/
|
||||
}
|
||||
|
||||
static void sw_a0_over(void *p)
|
||||
|
||||
Reference in New Issue
Block a user