mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
uDraw emulation [3]
This commit is contained in:
parent
21445fa01a
commit
ea8918291b
2 changed files with 22 additions and 22 deletions
|
|
@ -149,13 +149,13 @@ void usb_device_gametablet::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endp
|
|||
return;
|
||||
}
|
||||
|
||||
bool up = false, right = false, down = false, left = false;
|
||||
|
||||
{
|
||||
std::lock_guard lock(pad::g_pad_mutex);
|
||||
const auto gamepad_handler = pad::get_current_handler();
|
||||
const auto& pads = gamepad_handler->GetPads();
|
||||
|
||||
bool up = false, right = false, down = false, left = false;
|
||||
|
||||
const int pad_index = 1; // Player2
|
||||
const auto& pad = ::at32(pads, pad_index);
|
||||
if (pad->m_port_status & CELL_PAD_STATUS_CONNECTED)
|
||||
|
|
@ -218,27 +218,27 @@ void usb_device_gametablet::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endp
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!up && !right && !down && !left)
|
||||
buf[0x02] = 0x0f;
|
||||
else if (up && !left && !right)
|
||||
buf[0x02] = 0x00;
|
||||
else if (up && right)
|
||||
buf[0x02] = 0x01;
|
||||
else if (right && !up && !down)
|
||||
buf[0x02] = 0x02;
|
||||
else if (down && right)
|
||||
buf[0x02] = 0x03;
|
||||
else if (down && !left && !right)
|
||||
buf[0x02] = 0x04;
|
||||
else if (down && left)
|
||||
buf[0x02] = 0x05;
|
||||
else if (left && !up && !down)
|
||||
buf[0x02] = 0x06;
|
||||
else if (up && left)
|
||||
buf[0x02] = 0x07;
|
||||
}
|
||||
|
||||
if (!up && !right && !down && !left)
|
||||
buf[0x02] = 0x0f;
|
||||
else if (up && !left && !right)
|
||||
buf[0x02] = 0x00;
|
||||
else if (up && right)
|
||||
buf[0x02] = 0x01;
|
||||
else if (right && !up && !down)
|
||||
buf[0x02] = 0x02;
|
||||
else if (down && right)
|
||||
buf[0x02] = 0x03;
|
||||
else if (down && !left && !right)
|
||||
buf[0x02] = 0x04;
|
||||
else if (down && left)
|
||||
buf[0x02] = 0x05;
|
||||
else if (left && !up && !down)
|
||||
buf[0x02] = 0x06;
|
||||
else if (up && left)
|
||||
buf[0x02] = 0x07;
|
||||
|
||||
auto& mouse_handler = g_fxo->get<MouseHandlerBase>();
|
||||
std::lock_guard mouse_lock(mouse_handler.mutex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue