Add raw prv ev method to specify the time

This commit is contained in:
Rodrigo Arias 2021-09-23 12:40:59 +02:00 committed by Rodrigo Arias Mallo
parent 31e3f1218f
commit 9b39e4d69e
2 changed files with 11 additions and 1 deletions

9
prv.c
View File

@ -3,6 +3,7 @@
#include "ovni.h"
#include "emu.h"
#include "prv.h"
void
prv_ev(FILE *f, int row, int64_t time, int type, int val)
@ -10,10 +11,16 @@ prv_ev(FILE *f, int row, int64_t time, int type, int val)
fprintf(f, "2:0:1:1:%d:%ld:%d:%d\n", row, time, type, val);
}
void
prv_ev_thread_raw(struct ovni_emu *emu, int row, int64_t time, int type, int val)
{
prv_ev(emu->prv_thread, row, time, type, val);
}
void
prv_ev_thread(struct ovni_emu *emu, int row, int type, int val)
{
prv_ev(emu->prv_thread, row, emu->delta_time, type, val);
prv_ev_thread_raw(emu, row, emu->delta_time, type, val);
}
void

3
prv.h
View File

@ -25,6 +25,9 @@ enum prv_type {
void
prv_ev(FILE *f, int row, int64_t time, int type, int val);
void
prv_ev_thread_raw(struct ovni_emu *emu, int row, int64_t time, int type, int val);
void
prv_ev_thread(struct ovni_emu *emu, int row, int type, int val);