mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-07 06:40:12 +00:00
IPC_HLE: Clean up includes (IWYU)
Apply automated fixes by include-what-you-use (IWYU) (with some minor changes). IPC_HLE should now be essentially free of indirect includes.
This commit is contained in:
parent
1e94fdba3c
commit
3263831928
@ -20,27 +20,23 @@ in case of success they are
|
||||
They will also generate a true or false return for UpdateInterrupts() in WII_IPC.cpp.
|
||||
*/
|
||||
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Debugger/Debugger_SymbolMap.h"
|
||||
#include "Core/HW/CPU.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/HW/WII_IPC.h"
|
||||
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_DI.h"
|
||||
@ -57,12 +53,15 @@ They will also generate a true or false return for UpdateInterrupts() in WII_IPC
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.h"
|
||||
|
||||
namespace CoreTiming
|
||||
{
|
||||
struct EventType;
|
||||
} // namespace CoreTiming
|
||||
|
||||
#if defined(__LIBUSB__)
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_hid.h"
|
||||
#endif
|
||||
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
namespace WII_IPC_HLE_Interface
|
||||
{
|
||||
static std::map<u32, std::shared_ptr<IWII_IPC_HLE_Device>> s_device_map;
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
|
||||
|
@ -4,15 +4,15 @@
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/LogManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Core/HW/DVDInterface.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_DI.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
@ -5,9 +5,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace DVDInterface
|
||||
{
|
||||
enum DIInterruptType : int;
|
||||
|
@ -2,18 +2,17 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.h"
|
||||
|
@ -5,9 +5,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace File
|
||||
{
|
||||
class IOFile;
|
||||
|
@ -31,21 +31,27 @@
|
||||
*/
|
||||
// =============
|
||||
|
||||
// need to include this before mbedtls/aes.h,
|
||||
// otherwise we may not get __STDC_FORMAT_MACROS
|
||||
#include <cinttypes>
|
||||
#include <mbedtls/aes.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <mbedtls/aes.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/Boot/Boot_DOL.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/DVDInterface.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_es.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h"
|
||||
|
@ -9,9 +9,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
class CNANDContentLoader;
|
||||
|
@ -4,14 +4,19 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.h"
|
||||
@ -29,6 +34,13 @@ CWII_IPC_HLE_Device_fs::~CWII_IPC_HLE_Device_fs()
|
||||
{
|
||||
}
|
||||
|
||||
// ~1/1000th of a second is too short and causes hangs in Wii Party
|
||||
// Play it safe at 1/500th
|
||||
IPCCommandResult CWII_IPC_HLE_Device_fs::GetFSReply() const
|
||||
{
|
||||
return {true, SystemTimers::GetTicksPerSecond() / 500};
|
||||
}
|
||||
|
||||
IPCCommandResult CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode)
|
||||
{
|
||||
// clear tmp folder
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
@ -60,9 +64,7 @@ private:
|
||||
IOCTL_SHUTDOWN = 0x0D
|
||||
};
|
||||
|
||||
// ~1/1000th of a second is too short and causes hangs in Wii Party
|
||||
// Play it safe at 1/500th
|
||||
IPCCommandResult GetFSReply() const { return {true, SystemTimers::GetTicksPerSecond() / 500}; }
|
||||
IPCCommandResult GetFSReply() const;
|
||||
s32 ExecuteCommand(u32 Parameter, u32 _BufferIn, u32 _BufferInSize, u32 _BufferOut,
|
||||
u32 _BufferOutSize);
|
||||
};
|
||||
|
@ -2,15 +2,20 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Debugger/Debugger_SymbolMap.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/WII_IPC.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_hid.h"
|
||||
|
||||
|
@ -7,8 +7,10 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
@ -19,11 +21,11 @@
|
||||
#else
|
||||
#define LIBUSB_CALL
|
||||
#endif
|
||||
struct libusb_device_handle;
|
||||
struct libusb_device_descriptor;
|
||||
struct libusb_config_descriptor;
|
||||
struct libusb_interface_descriptor;
|
||||
struct libusb_device_descriptor;
|
||||
struct libusb_device_handle;
|
||||
struct libusb_endpoint_descriptor;
|
||||
struct libusb_interface_descriptor;
|
||||
struct libusb_transfer;
|
||||
|
||||
#define HID_ID_MASK 0x0000FFFFFFFFFFFF
|
||||
|
@ -6,14 +6,19 @@
|
||||
#include <cinttypes>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
@ -21,11 +26,9 @@
|
||||
#include "Common/Network.h"
|
||||
#include "Common/SettingsHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IPC_HLE/ICMP.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_es.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net.h"
|
||||
#include "Core/IPC_HLE/WII_Socket.h"
|
||||
#include "Core/ec_wii.h"
|
||||
@ -38,16 +41,8 @@
|
||||
#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
|
||||
|
||||
#elif defined(__linux__) or defined(__APPLE__)
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <net/if.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef struct pollfd pollfd_t;
|
||||
#else
|
||||
|
@ -4,12 +4,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/Timer.h"
|
||||
#include "Core/HW/EXI_DeviceIPL.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/NWC24Config.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
#include "Core/IPC_HLE/WiiNetConfig.h"
|
||||
|
||||
|
@ -2,12 +2,17 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <mbedtls/md.h>
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h"
|
||||
#include "Core/IPC_HLE/WII_Socket.h"
|
||||
|
||||
|
@ -7,15 +7,19 @@
|
||||
// These imports need to be in this order for mbed to be included correctly.
|
||||
// clang-format off
|
||||
|
||||
#include <mbedtls/platform.h>
|
||||
#include <mbedtls/ctr_drbg.h>
|
||||
#include <mbedtls/entropy.h>
|
||||
#include <mbedtls/net.h>
|
||||
#include <mbedtls/pk.h>
|
||||
#include <mbedtls/platform.h>
|
||||
#include <mbedtls/ssl.h>
|
||||
#include <mbedtls/x509_crt.h>
|
||||
#include <string>
|
||||
|
||||
// clang-format on
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
#define NET_SSL_MAXINSTANCES 4
|
||||
|
@ -2,14 +2,17 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/SDCardUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/CPU.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.h"
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
namespace File
|
||||
{
|
||||
class IOFile;
|
||||
}
|
||||
|
||||
class CWII_IPC_HLE_Device_sdio_slot0 : public IWII_IPC_HLE_Device
|
||||
{
|
||||
|
@ -3,6 +3,11 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_stm.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
|
||||
namespace Core
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
enum
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -12,8 +13,6 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_base.h"
|
||||
|
||||
@ -86,3 +85,8 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305_base::CtrlBuffer::FillBuffer(const u8*
|
||||
m_length);
|
||||
Memory::CopyToEmu(m_payload_addr, src, size);
|
||||
}
|
||||
|
||||
void CWII_IPC_HLE_Device_usb_oh1_57e_305_base::CtrlBuffer::SetRetVal(const u32 retval) const
|
||||
{
|
||||
Memory::Write_U32(retval, m_cmd_address + 4);
|
||||
}
|
||||
|
@ -4,9 +4,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class PointerWrap;
|
||||
class SysConf;
|
||||
|
||||
void BackUpBTInfoSection(SysConf* sysconf);
|
||||
@ -74,7 +79,7 @@ protected:
|
||||
CtrlBuffer(const SIOCtlVBuffer& cmd_buffer, u32 command_address);
|
||||
|
||||
void FillBuffer(const u8* src, size_t size) const;
|
||||
void SetRetVal(const u32 retval) const { Memory::Write_U32(retval, m_cmd_address + 4); }
|
||||
void SetRetVal(const u32 retval) const;
|
||||
bool IsValid() const { return m_cmd_address != 0; }
|
||||
void Invalidate() { m_cmd_address = m_payload_addr = 0; }
|
||||
u8 m_endpoint = 0;
|
||||
|
@ -2,22 +2,37 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Core/HW/WII_IPC.h"
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Debugger/Debugger_SymbolMap.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
SQueuedEvent::SQueuedEvent(u32 size, u16 handle) : m_size(size), m_connectionHandle(handle)
|
||||
{
|
||||
if (m_size > 1024)
|
||||
PanicAlert("SQueuedEvent: The size is too large.");
|
||||
}
|
||||
|
||||
// The device class
|
||||
CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::CWII_IPC_HLE_Device_usb_oh1_57e_305_emu(
|
||||
u32 _DeviceID, const std::string& _rDeviceName)
|
||||
|
@ -7,32 +7,27 @@
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_base.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h"
|
||||
#include "Core/IPC_HLE/hci.h"
|
||||
|
||||
class CWII_IPC_HLE_WiiMote;
|
||||
class PointerWrap;
|
||||
|
||||
struct SQueuedEvent
|
||||
{
|
||||
u8 m_buffer[1024];
|
||||
u8 m_buffer[1024] = {0};
|
||||
u32 m_size = 0;
|
||||
u16 m_connectionHandle = 0;
|
||||
|
||||
SQueuedEvent(u32 size, u16 connectionHandle) : m_size(size), m_connectionHandle(connectionHandle)
|
||||
{
|
||||
if (m_size > 1024)
|
||||
{
|
||||
// i know this code sux...
|
||||
PanicAlert("SQueuedEvent: allocate too big buffer!!");
|
||||
}
|
||||
memset(m_buffer, 0, 1024);
|
||||
}
|
||||
|
||||
SQueuedEvent(u32 size, u16 handle);
|
||||
SQueuedEvent() = default;
|
||||
};
|
||||
|
||||
|
@ -3,19 +3,30 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <libusb.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/Network.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Thread.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_real.h"
|
||||
#include "Core/IPC_HLE/hci.h"
|
||||
|
||||
|
@ -7,15 +7,19 @@
|
||||
#if defined(__LIBUSB__)
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "Common/Timer.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_base.h"
|
||||
|
||||
class PointerWrap;
|
||||
struct libusb_context;
|
||||
struct libusb_device;
|
||||
struct libusb_device_handle;
|
||||
struct libusb_context;
|
||||
struct libusb_transfer;
|
||||
|
||||
enum class SyncButtonState
|
||||
@ -96,5 +100,6 @@ private:
|
||||
|
||||
#else
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_stub.h"
|
||||
|
||||
using CWII_IPC_HLE_Device_usb_oh1_57e_305_real = CWII_IPC_HLE_Device_usb_oh1_57e_305_stub;
|
||||
#endif
|
||||
|
@ -3,6 +3,8 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_stub.h"
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
namespace Core
|
||||
|
@ -4,8 +4,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_base.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
class CWII_IPC_HLE_Device_usb_oh1_57e_305_stub final
|
||||
: public CWII_IPC_HLE_Device_usb_oh1_57e_305_base
|
||||
{
|
||||
|
@ -2,17 +2,34 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h" // Local core functions
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
CWII_IPC_HLE_Device_usb_kbd::SMessageData::SMessageData(u32 type, u8 modifiers, u8* pressed_keys)
|
||||
{
|
||||
MsgType = Common::swap32(type);
|
||||
Unk1 = 0; // swapped
|
||||
Modifiers = modifiers;
|
||||
Unk2 = 0;
|
||||
|
||||
if (pressed_keys) // Doesn't need to be in a specific order
|
||||
memcpy(PressedKeys, pressed_keys, sizeof(PressedKeys));
|
||||
else
|
||||
memset(PressedKeys, 0, sizeof(PressedKeys));
|
||||
}
|
||||
|
||||
// TODO: support in netplay/movies.
|
||||
|
||||
CWII_IPC_HLE_Device_usb_kbd::CWII_IPC_HLE_Device_usb_kbd(u32 _DeviceID,
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <queue>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device.h"
|
||||
|
||||
class CWII_IPC_HLE_Device_usb_kbd : public IWII_IPC_HLE_Device
|
||||
@ -38,18 +40,7 @@ private:
|
||||
u8 Unk2;
|
||||
u8 PressedKeys[6];
|
||||
|
||||
SMessageData(u32 _MsgType, u8 _Modifiers, u8* _PressedKeys)
|
||||
{
|
||||
MsgType = Common::swap32(_MsgType);
|
||||
Unk1 = 0; // swapped
|
||||
Modifiers = _Modifiers;
|
||||
Unk2 = 0;
|
||||
|
||||
if (_PressedKeys) // Doesn't need to be in a specific order
|
||||
memcpy(PressedKeys, _PressedKeys, sizeof(PressedKeys));
|
||||
else
|
||||
memset(PressedKeys, 0, sizeof(PressedKeys));
|
||||
}
|
||||
SMessageData(u32 msg_type, u8 modifiers, u8* pressed_keys);
|
||||
};
|
||||
#pragma pack(pop)
|
||||
std::queue<SMessageData> m_MessageQueue;
|
||||
|
@ -2,11 +2,17 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/Host.h"
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
@ -46,9 +46,12 @@ typedef struct pollfd pollfd_t;
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/NonCopyable.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h"
|
||||
|
@ -2,13 +2,9 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Core/IPC_HLE/WiiMote_HID_Attr.h"
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Core/IPC_HLE/WiiMote_HID_Attr.h"
|
||||
|
||||
#if 0
|
||||
// 0x00 (checked)
|
||||
|
Loading…
x
Reference in New Issue
Block a user