api: sdvx tape led (#857)

## Link to GitHub Issue or related Pull Request, if one exists
Fixes #852

## Description of change
Add SDVX valk cab tape LED output over API

## Testing
tested with custom python script over api
This commit is contained in:
bicarus
2026-08-07 00:38:17 -07:00
committed by GitHub
parent b53447bed5
commit baa550037a
13 changed files with 182 additions and 32 deletions
+7 -4
View File
@@ -3,6 +3,7 @@
#if SPICE64
#include <cstdint>
#include "api/client.h"
#include "util/detour.h"
#include "util/logging.h"
#include "util/utils.h"
@@ -443,10 +444,12 @@ namespace games::iidx {
GameAPI::Lights::writeLight(RI_MGR, lights[map.index_g], rgb.g);
GameAPI::Lights::writeLight(RI_MGR, lights[map.index_b], rgb.b);
for (unsigned int i = 0; i < data_size; ++i) {
map.data[i].r = data[i * 3];
map.data[i].g = data[i * 3 + 1];
map.data[i].b = data[i * 3 + 2];
if (api::has_clients()) {
for (size_t i = 0; i < data_size; ++i) {
map.data[i].r = data[i * 3];
map.data[i].g = data[i * 3 + 1];
map.data[i].b = data[i * 3 + 2];
}
}
}