From 07cd58ebc01987c88b58c36485828f5caefe06c8 Mon Sep 17 00:00:00 2001 From: ayuanx Date: Fri, 4 Dec 2009 12:13:39 +0000 Subject: [PATCH] Fixed the "usb_kbd is not able to run Close()" issue. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4639 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp | 9 +++++++++ .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h | 1 + 2 files changed, 10 insertions(+) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp index 29dea2f024..c2f33a5ccc 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp @@ -44,6 +44,15 @@ bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode) return true; } +bool CWII_IPC_HLE_Device_usb_kbd::Close(u32 _CommandAddress, bool _bForce) +{ + INFO_LOG(WII_IPC_NET, "USB_KBD: Close"); + if (!_bForce) + Memory::Write_U32(0, _CommandAddress + 4); + m_Active = false; + return true; +} + bool CWII_IPC_HLE_Device_usb_kbd::Write(u32 _CommandAddress) { WARN_LOG(WII_IPC_STM, "Ignoring write to CWII_IPC_HLE_Device_usb_kbd"); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h index 445c494cfd..f17679a326 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h @@ -8,6 +8,7 @@ public: virtual ~CWII_IPC_HLE_Device_usb_kbd(); virtual bool Open(u32 _CommandAddress, u32 _Mode); + virtual bool Close(u32 _CommandAddress, bool _bForce); virtual bool Write(u32 _CommandAddress); virtual bool IOCtl(u32 _CommandAddress); virtual u32 Update();