Avoid double copy of mcv in emu_ev
This commit is contained in:
parent
c55a92872b
commit
e907474ea9
@ -7,9 +7,9 @@ void
|
|||||||
emu_ev(struct emu_ev *ev, const struct ovni_ev *oev,
|
emu_ev(struct emu_ev *ev, const struct ovni_ev *oev,
|
||||||
int64_t sclock, int64_t dclock)
|
int64_t sclock, int64_t dclock)
|
||||||
{
|
{
|
||||||
ev->mcv[0] = ev->m = oev->header.model;
|
ev->m = oev->header.model;
|
||||||
ev->mcv[1] = ev->c = oev->header.category;
|
ev->c = oev->header.category;
|
||||||
ev->mcv[2] = ev->v = oev->header.value;
|
ev->v = oev->header.value;
|
||||||
ev->mcv[3] = '\0';
|
ev->mcv[3] = '\0';
|
||||||
|
|
||||||
ev->rclock = oev->header.clock;
|
ev->rclock = oev->header.clock;
|
||||||
|
@ -9,10 +9,15 @@
|
|||||||
|
|
||||||
/* Easier to parse emulation event */
|
/* Easier to parse emulation event */
|
||||||
struct emu_ev {
|
struct emu_ev {
|
||||||
uint8_t m;
|
union {
|
||||||
uint8_t c;
|
struct {
|
||||||
uint8_t v;
|
uint8_t m;
|
||||||
char mcv[4];
|
uint8_t c;
|
||||||
|
uint8_t v;
|
||||||
|
uint8_t nil;
|
||||||
|
};
|
||||||
|
char mcv[4];
|
||||||
|
};
|
||||||
|
|
||||||
int64_t rclock; /* As-is clock in the binary stream */
|
int64_t rclock; /* As-is clock in the binary stream */
|
||||||
int64_t sclock; /* Corrected clock with stream offset */
|
int64_t sclock; /* Corrected clock with stream offset */
|
||||||
|
Loading…
Reference in New Issue
Block a user