mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
Use std::string_view in midi handlers
This commit is contained in:
parent
74f3349b19
commit
5bc128e085
@ -313,7 +313,7 @@ usb_device_rb3_midi_drums::Definition::Definition(std::string name, const std::s
|
||||
, create_state{create_state}
|
||||
{}
|
||||
|
||||
usb_device_rb3_midi_drums::usb_device_rb3_midi_drums(const std::array<u8, 7>& location, const std::string& device_name)
|
||||
usb_device_rb3_midi_drums::usb_device_rb3_midi_drums(const std::array<u8, 7>& location, std::string_view device_name)
|
||||
: usb_device_emulated(location)
|
||||
{
|
||||
m_id_to_note_mapping = midi::create_id_to_note_mapping();
|
||||
|
||||
@ -109,7 +109,7 @@ enum class Note : u8
|
||||
class usb_device_rb3_midi_drums : public usb_device_emulated
|
||||
{
|
||||
public:
|
||||
usb_device_rb3_midi_drums(const std::array<u8, 7>& location, const std::string& device_name);
|
||||
usb_device_rb3_midi_drums(const std::array<u8, 7>& location, std::string_view device_name);
|
||||
~usb_device_rb3_midi_drums();
|
||||
|
||||
void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
LOG_CHANNEL(rb3_midi_guitar_log);
|
||||
|
||||
usb_device_rb3_midi_guitar::usb_device_rb3_midi_guitar(const std::array<u8, 7>& location, const std::string& device_name, bool twentytwo_fret)
|
||||
usb_device_rb3_midi_guitar::usb_device_rb3_midi_guitar(const std::array<u8, 7>& location, std::string_view device_name, bool twentytwo_fret)
|
||||
: usb_device_emulated(location)
|
||||
{
|
||||
// For the 22-fret guitar (Fender Squier), the only thing that's different
|
||||
|
||||
@ -36,7 +36,7 @@ private:
|
||||
void write_state(u8* buf);
|
||||
|
||||
public:
|
||||
usb_device_rb3_midi_guitar(const std::array<u8, 7>& location, const std::string& device_name, bool twentytwo_fret);
|
||||
usb_device_rb3_midi_guitar(const std::array<u8, 7>& location, std::string_view device_name, bool twentytwo_fret);
|
||||
~usb_device_rb3_midi_guitar();
|
||||
|
||||
void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
LOG_CHANNEL(rb3_midi_keyboard_log);
|
||||
|
||||
usb_device_rb3_midi_keyboard::usb_device_rb3_midi_keyboard(const std::array<u8, 7>& location, const std::string& device_name)
|
||||
usb_device_rb3_midi_keyboard::usb_device_rb3_midi_keyboard(const std::array<u8, 7>& location, std::string_view device_name)
|
||||
: usb_device_emulated(location)
|
||||
{
|
||||
device = UsbDescriptorNode(USB_DESCRIPTOR_DEVICE, UsbDeviceDescriptor{0x0200, 0x00, 0x00, 0x00, 64, 0x12ba, 0x2338, 0x01, 0x01, 0x02, 0x00, 0x01});
|
||||
|
||||
@ -41,7 +41,7 @@ private:
|
||||
void write_state(u8* buf);
|
||||
|
||||
public:
|
||||
usb_device_rb3_midi_keyboard(const std::array<u8, 7>& location, const std::string& device_name);
|
||||
usb_device_rb3_midi_keyboard(const std::array<u8, 7>& location, std::string_view device_name);
|
||||
~usb_device_rb3_midi_keyboard();
|
||||
|
||||
void control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) override;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user