uDraw emulation [3]

This commit is contained in:
Florin9doi 2024-04-17 15:58:51 +03:00 committed by Megamouse
parent 21445fa01a
commit ea8918291b
2 changed files with 22 additions and 22 deletions

View File

@ -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);

View File

@ -231,7 +231,7 @@ public:
const QString buzz = tr("Buzz! support.\nSelect 1 or 2 controllers if the game requires Buzz! controllers and you don't have real controllers.\nSelect Null if the game has support for DualShock or if you have real Buzz! controllers.");
const QString turntable = tr("DJ Hero Turntable controller support.\nSelect 1 or 2 controllers if the game requires DJ Hero Turntable controllers and you don't have real turntable controllers.\nSelect Null if the game has support for DualShock or if you have real turntable controllers.\nA real turntable controller can be used at the same time as an emulated turntable controller.");
const QString ghltar = tr("Guitar Hero Live (GHL) Guitar controller support.\nSelect 1 or 2 controllers if the game requires GHL Guitar controllers and you don't have real guitar controllers.\nSelect Null if the game has support for DualShock or if you have real guitar controllers.\nA real guitar controller can be used at the same time as an emulated guitar controller.");
const QString gametablet = tr("GameTablet emulated controller support.\nDisable to use a physical GameTablet device");
const QString gametablet = tr("uDraw GameTablet emulated controller support.\nDisable to use a physical uDraw GameTablet device.\n• uDraw Studio: Instant Artist requires to configure Mouse Handler=Basic, Pad1=Connected and Pad2=Null.\n• Marvel Super Hero Squad: Comic Combat requires to configure Mouse Handler=Basic, Pad1=Null and Pad2=Connected.");
const QString background_input = tr("Allows pad and keyboard input while the game window is unfocused.");
const QString show_move_cursor = tr("Shows the raw position of the PS Move input.\nThis can be very helpful during calibration screens.");
const QString midi_devices = tr("Select up to 3 emulated MIDI devices and their types.");