mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-25 10:43:57 +00:00
added dummy device for keyboard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2650 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
727f74fc9d
commit
b3a6208fcc
@ -1953,6 +1953,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// CWII_IPC_HLE_Device_usb_oh0
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName)
|
CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName)
|
||||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||||
{
|
{
|
||||||
@ -1960,31 +1967,20 @@ CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const st
|
|||||||
|
|
||||||
CWII_IPC_HLE_Device_usb_oh0::~CWII_IPC_HLE_Device_usb_oh0()
|
CWII_IPC_HLE_Device_usb_oh0::~CWII_IPC_HLE_Device_usb_oh0()
|
||||||
{}
|
{}
|
||||||
///////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// ===================================================
|
|
||||||
/* Open */
|
|
||||||
// ----------------
|
|
||||||
bool CWII_IPC_HLE_Device_usb_oh0::Open(u32 _CommandAddress, u32 _Mode)
|
bool CWII_IPC_HLE_Device_usb_oh0::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
{
|
{
|
||||||
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ===================================================
|
|
||||||
/* IOCtl */
|
|
||||||
// ----------------
|
|
||||||
bool CWII_IPC_HLE_Device_usb_oh0::IOCtl(u32 _CommandAddress)
|
bool CWII_IPC_HLE_Device_usb_oh0::IOCtl(u32 _CommandAddress)
|
||||||
{
|
{
|
||||||
return IOCtlV(_CommandAddress); //hack
|
// write return value
|
||||||
|
Memory::Write_U32(0, _CommandAddress + 0x4);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ===================================================
|
|
||||||
/* IOCtlV */
|
|
||||||
// ----------------
|
|
||||||
bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress)
|
bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress)
|
||||||
{
|
{
|
||||||
// write return value
|
// write return value
|
||||||
@ -1992,5 +1988,37 @@ bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ================
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// CWII_IPC_HLE_Device_usb_kbd
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
CWII_IPC_HLE_Device_usb_kbd::CWII_IPC_HLE_Device_usb_kbd(u32 _DeviceID, const std::string& _rDeviceName)
|
||||||
|
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CWII_IPC_HLE_Device_usb_kbd::~CWII_IPC_HLE_Device_usb_kbd()
|
||||||
|
{}
|
||||||
|
|
||||||
|
bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
|
{
|
||||||
|
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWII_IPC_HLE_Device_usb_kbd::IOCtl(u32 _CommandAddress)
|
||||||
|
{
|
||||||
|
u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);
|
||||||
|
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
|
||||||
|
u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14);
|
||||||
|
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
|
||||||
|
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
||||||
|
|
||||||
|
ERROR_LOG(WII_IPC, "USB_KBD not implemented: parameter %i", Parameter);
|
||||||
|
Memory::Write_U32(0, _CommandAddress + 0x4);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -232,6 +232,27 @@ public:
|
|||||||
virtual bool IOCtl(u32 _CommandAddress);
|
virtual bool IOCtl(u32 _CommandAddress);
|
||||||
|
|
||||||
// virtual u32 Update();
|
// virtual u32 Update();
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CWII_IPC_HLE_Device_usb_kbd : public IWII_IPC_HLE_Device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
CWII_IPC_HLE_Device_usb_kbd(u32 _DeviceID, const std::string& _rDeviceName);
|
||||||
|
|
||||||
|
virtual ~CWII_IPC_HLE_Device_usb_kbd();
|
||||||
|
|
||||||
|
virtual bool Open(u32 _CommandAddress, u32 _Mode);
|
||||||
|
|
||||||
|
virtual bool IOCtl(u32 _CommandAddress);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user