mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-13 18:00:49 +01:00
bio2/iidx: Swap in and out struct names to align with sdvx definitions
From hosts perspective: - "in" for inputs received from device - "out" for outputs to send to device
This commit is contained in:
parent
34c95561c4
commit
d5e186ffe2
@ -30,7 +30,7 @@ struct bi2a_iidx_panel {
|
||||
uint8_t y_start1 : 1;
|
||||
};
|
||||
|
||||
struct bi2a_iidx_state_out {
|
||||
struct bi2a_iidx_state_in {
|
||||
struct bi2a_iidx_slider SLIDER1;
|
||||
struct bi2a_iidx_system SYSTEM;
|
||||
struct bi2a_iidx_slider SLIDER2;
|
||||
@ -84,7 +84,7 @@ struct bi2a_iidx_light {
|
||||
uint8_t l_state : 1;
|
||||
};
|
||||
|
||||
struct bi2a_iidx_state_in {
|
||||
struct bi2a_iidx_state_out {
|
||||
struct bi2a_iidx_light UNK1[3];
|
||||
struct bi2a_iidx_light PANEL[4];
|
||||
struct bi2a_iidx_light DECKSW[14];
|
||||
@ -96,11 +96,11 @@ struct bi2a_iidx_state_in {
|
||||
uint8_t UNK3[7];
|
||||
};
|
||||
_Static_assert(
|
||||
sizeof(struct bi2a_iidx_state_in) == 48,
|
||||
"bi2a_iidx_state_in is the wrong size");
|
||||
_Static_assert(
|
||||
sizeof(struct bi2a_iidx_state_out) == 46,
|
||||
sizeof(struct bi2a_iidx_state_out) == 48,
|
||||
"bi2a_iidx_state_out is the wrong size");
|
||||
_Static_assert(
|
||||
sizeof(struct bi2a_iidx_state_in) == 46,
|
||||
"bi2a_iidx_state_in is the wrong size");
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
@ -188,8 +188,8 @@ static void
|
||||
bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req)
|
||||
{
|
||||
struct ac_io_message resp;
|
||||
struct bi2a_iidx_state_out *body;
|
||||
struct bi2a_iidx_state_in *req_bi2a;
|
||||
struct bi2a_iidx_state_in *body;
|
||||
struct bi2a_iidx_state_out *req_bi2a;
|
||||
|
||||
uint8_t input_sys = 0;
|
||||
uint8_t input_panel = 0;
|
||||
@ -204,8 +204,8 @@ bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req)
|
||||
resp.addr = req->addr | AC_IO_RESPONSE_FLAG;
|
||||
resp.cmd.code = req->cmd.code;
|
||||
resp.cmd.seq_no = req->cmd.seq_no;
|
||||
resp.cmd.nbytes = sizeof(struct bi2a_iidx_state_out);
|
||||
req_bi2a = (struct bi2a_iidx_state_in *) req->cmd.raw;
|
||||
resp.cmd.nbytes = sizeof(struct bi2a_iidx_state_in);
|
||||
req_bi2a = (struct bi2a_iidx_state_out *) req->cmd.raw;
|
||||
|
||||
packed_lights.panel_lights = 0;
|
||||
for (size_t i = 0; i < 4; ++i) {
|
||||
@ -246,8 +246,8 @@ bio2_emu_bi2a_send_state(struct ac_io_emu *emu, const struct ac_io_message *req)
|
||||
return bio2_emu_bi2a_send_status(emu, req, 0);
|
||||
}
|
||||
|
||||
body = (struct bi2a_iidx_state_out *) &resp.cmd.raw;
|
||||
memset(body, 0, sizeof(struct bi2a_iidx_state_out));
|
||||
body = (struct bi2a_iidx_state_in *) &resp.cmd.raw;
|
||||
memset(body, 0, sizeof(struct bi2a_iidx_state_in));
|
||||
|
||||
// IIDX25 polls really really fast, this limits it to 1000Hz
|
||||
if (poll_delay) {
|
||||
|
Loading…
Reference in New Issue
Block a user