gamebridge: Twitch Control #2

Merged
cadey merged 29 commits from gamebridge into master 2020-05-11 22:40:05 +00:00
2 changed files with 50 additions and 0 deletions
Showing only changes of commit 3e3be0dc1e - Show all commits

46
longjump.inputs Normal file
View File

@ -0,0 +1,46 @@
0000f97f
0000f97f
0000f97f
0000f97f
0000f97f
2000fa7f
2000fa7f
2000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000fa7f
a000ff7f
a000177f
a000347f
a0005479
a0005a74
a0005a73
a0006269
a0006664
a0006b5f
a0006b5e
20006b5e
20006b5e
20006b5e
2000576b
20003e6f
20002765
20002042
20001e24
20000000
20000000
20000000
20000000
20000000
20000000

View File

@ -30,12 +30,14 @@ static void tas_recorder_init(void) {
memset(buf, 0, sizeof(buf));
fwrite(buf, 1, sizeof(buf), fout);
atexit(tas_recorder_close);
counter = 0;
}
static void tas_recorder_read(OSContPad *pad) {
if (fout == NULL) {
return;
}
counter += 4;
uint8_t bytes[4] = {0};
int button1 = pad->button;
@ -45,6 +47,8 @@ static void tas_recorder_read(OSContPad *pad) {
bytes[2] = pad->stick_x;
bytes[3] = pad->stick_y;
fwrite(bytes, 1, 4, fout);
printf("[tas_recorder] %08x: %04x %02x%02x\n", (counter + OFFSET), pad->button, bytes[2], bytes[3]);
}
struct ControllerAPI controller_tas_recorder = {