src/gba/gba-rr.h (view raw)
1#ifndef GBA_RR_H
2#define GBA_RR_H
3
4#include "common.h"
5
6struct GBA;
7struct VDir;
8struct VFile;
9
10struct GBARRContext {
11 // Playback state
12 bool isPlaying;
13 bool autorecord;
14 uint16_t nextInput;
15
16 // Recording state
17 bool isRecording;
18 bool inputThisFrame;
19
20 // Metadata
21 uint32_t frames;
22 uint32_t lagFrames;
23
24 // Streaming state
25 struct VDir* streamDir;
26 struct VFile* inputsStream;
27};
28
29void GBARRContextCreate(struct GBA*);
30void GBARRContextDestroy(struct GBA*);
31
32bool GBARRSetStream(struct GBARRContext*, struct VDir*);
33
34bool GBARRStartPlaying(struct GBARRContext*, bool autorecord);
35void GBARRStopPlaying(struct GBARRContext*);
36bool GBARRStartRecording(struct GBARRContext*);
37void GBARRStopRecording(struct GBARRContext*);
38
39bool GBARRIsPlaying(struct GBARRContext*);
40bool GBARRIsRecording(struct GBARRContext*);
41
42void GBARRNextFrame(struct GBARRContext*);
43void GBARRLogInput(struct GBARRContext*, uint16_t input);
44uint16_t GBARRQueryInput(struct GBARRContext*);
45
46#endif