Skip to content

Commit 407d287

Browse files
authored
tweak LoadFigure and RemoveFigure (#4071)
1 parent c265a39 commit 407d287

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/core/ipc/ipc.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,18 @@ void IPC::InputLoop() {
174174
} else if (cmd == "USB_LOAD_FIGURE") {
175175
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();
176176
if (ref) {
177-
ref->LoadFigure(next_str(), next_u64(), next_u64());
177+
std::string file_name = next_str();
178+
const u8 pad = next_u64();
179+
const u8 slot = next_u64();
180+
ref->LoadFigure(file_name, pad, slot);
178181
}
179182
} else if (cmd == "USB_REMOVE_FIGURE") {
180183
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();
181184
if (ref) {
182-
ref->RemoveFigure(next_u64(), next_u64(), next_u64() != 0);
185+
const u8 pad = next_u64();
186+
const u8 slot = next_u64();
187+
bool full_remove = next_u64() != 0;
188+
ref->RemoveFigure(pad, slot, full_remove);
183189
}
184190
} else if (cmd == "USB_MOVE_FIGURE") {
185191
const auto ref = Libraries::Usbd::usb_backend->GetImplRef();

0 commit comments

Comments
 (0)