allegro5: fix build w/ musl-1.2.1 (time64)
This commit is contained in:
parent
ec261e858a
commit
e8f2bc9472
|
@ -0,0 +1,49 @@
|
|||
--- src/linux/lhaptic.c 2015-06-01 21:58:12.000000000 +0200
|
||||
+++ src/linux/lhaptic.c 2020-12-06 09:50:58.475010832 +0100
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
|
||||
/* forward declarations */
|
||||
+static void lhap_timerclear(struct input_event* event);
|
||||
static bool lhap_init_haptic(void);
|
||||
static void lhap_exit_haptic(void);
|
||||
|
||||
@@ -162,6 +163,11 @@
|
||||
{ -1, -1 }
|
||||
};
|
||||
|
||||
+static void lhap_timerclear(struct input_event* event)
|
||||
+{
|
||||
+ event->input_event_sec = 0;
|
||||
+ event->input_event_usec = 0;
|
||||
+}
|
||||
|
||||
static bool lhap_init_haptic(void)
|
||||
{
|
||||
@@ -622,7 +628,7 @@
|
||||
struct input_event ie;
|
||||
|
||||
lhap->parent.gain = gain;
|
||||
- timerclear(&ie.time);
|
||||
+ lhap_timerclear(&ie);
|
||||
ie.type = EV_FF;
|
||||
ie.code = FF_GAIN;
|
||||
ie.value = (__s32) ((double)0xFFFF * gain);
|
||||
@@ -639,7 +645,7 @@
|
||||
struct input_event ie;
|
||||
|
||||
lhap->parent.autocenter = autocenter;
|
||||
- timerclear(&ie.time);
|
||||
+ lhap_timerclear(&ie);
|
||||
ie.type = EV_FF;
|
||||
ie.code = FF_AUTOCENTER;
|
||||
ie.value = (__s32) ((double)0xFFFF * autocenter);
|
||||
@@ -765,7 +771,7 @@
|
||||
|
||||
fd = lhap->fd;
|
||||
|
||||
- timerclear(&play.time);
|
||||
+ lhap_timerclear(&play);
|
||||
play.type = EV_FF;
|
||||
play.code = id->_handle;
|
||||
loops = (loops < 0) ? 1 : loops;
|
Loading…
Reference in New Issue