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,
|
||||
int64_t sclock, int64_t dclock)
|
||||
{
|
||||
ev->mcv[0] = ev->m = oev->header.model;
|
||||
ev->mcv[1] = ev->c = oev->header.category;
|
||||
ev->mcv[2] = ev->v = oev->header.value;
|
||||
ev->m = oev->header.model;
|
||||
ev->c = oev->header.category;
|
||||
ev->v = oev->header.value;
|
||||
ev->mcv[3] = '\0';
|
||||
|
||||
ev->rclock = oev->header.clock;
|
||||
|
@ -9,10 +9,15 @@
|
||||
|
||||
/* Easier to parse emulation event */
|
||||
struct emu_ev {
|
||||
uint8_t m;
|
||||
uint8_t c;
|
||||
uint8_t v;
|
||||
char mcv[4];
|
||||
union {
|
||||
struct {
|
||||
uint8_t m;
|
||||
uint8_t c;
|
||||
uint8_t v;
|
||||
uint8_t nil;
|
||||
};
|
||||
char mcv[4];
|
||||
};
|
||||
|
||||
int64_t rclock; /* As-is clock in the binary stream */
|
||||
int64_t sclock; /* Corrected clock with stream offset */
|
||||
|
Loading…
Reference in New Issue
Block a user