tweak LoadFigure and RemoveFigure (#4071)

This commit is contained in:
ElBread3 2026-02-23 19:30:57 +00:00 committed by GitHub
parent c265a39227
commit 407d287fb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,12 +174,18 @@ void IPC::InputLoop() {
} else if (cmd == "USB_LOAD_FIGURE") {
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();
if (ref) {
ref->LoadFigure(next_str(), next_u64(), next_u64());
std::string file_name = next_str();
const u8 pad = next_u64();
const u8 slot = next_u64();
ref->LoadFigure(file_name, pad, slot);
}
} else if (cmd == "USB_REMOVE_FIGURE") {
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();
if (ref) {
ref->RemoveFigure(next_u64(), next_u64(), next_u64() != 0);
const u8 pad = next_u64();
const u8 slot = next_u64();
bool full_remove = next_u64() != 0;
ref->RemoveFigure(pad, slot, full_remove);
}
} else if (cmd == "USB_MOVE_FIGURE") {
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();