Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #5930 from delroth/wfs
Fix Dragon Quest X offline mode on Dolphin
- Loading branch information
Showing
15 changed files
with
395 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #include "Core/IOS/USB/USB_HID/HIDv5.h" | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "Core/HW/Memmap.h" | ||
| #include "Core/IOS/Device.h" | ||
| #include "Core/IOS/USB/Common.h" | ||
| #include "Core/IOS/USB/USBV5.h" | ||
|
|
||
| namespace IOS | ||
| { | ||
| namespace HLE | ||
| { | ||
| namespace Device | ||
| { | ||
| USB_HIDv5::USB_HIDv5(Kernel& ios, const std::string& device_name) : USBHost(ios, device_name) | ||
| { | ||
| } | ||
|
|
||
| USB_HIDv5::~USB_HIDv5() | ||
| { | ||
| StopThreads(); | ||
| } | ||
|
|
||
| IPCCommandResult USB_HIDv5::IOCtl(const IOCtlRequest& request) | ||
| { | ||
| request.Log(GetDeviceName(), LogTypes::IOS_USB); | ||
| switch (request.request) | ||
| { | ||
| case USB::IOCTL_USBV5_GETVERSION: | ||
| Memory::Write_U32(VERSION, request.buffer_out); | ||
| return GetDefaultReply(IPC_SUCCESS); | ||
| case USB::IOCTL_USBV5_SHUTDOWN: | ||
| if (m_hanging_request) | ||
| { | ||
| IOCtlRequest hanging_request{m_hanging_request}; | ||
| m_ios.EnqueueIPCReply(hanging_request, IPC_SUCCESS); | ||
| } | ||
| return GetDefaultReply(IPC_SUCCESS); | ||
| case USB::IOCTL_USBV5_GETDEVICECHANGE: | ||
| if (m_devicechange_replied) | ||
| { | ||
| m_hanging_request = request.address; | ||
| return GetNoReply(); | ||
| } | ||
| else | ||
| { | ||
| m_devicechange_replied = true; | ||
| return GetDefaultReply(IPC_SUCCESS); | ||
| } | ||
| default: | ||
| request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB); | ||
| return GetDefaultReply(IPC_SUCCESS); | ||
| } | ||
| } | ||
|
|
||
| } // namespace Device | ||
| } // namespace HLE | ||
| } // namespace IOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "Common/CommonTypes.h" | ||
| #include "Core/IOS/IOS.h" | ||
| #include "Core/IOS/USB/Host.h" | ||
|
|
||
| namespace IOS | ||
| { | ||
| namespace HLE | ||
| { | ||
| namespace Device | ||
| { | ||
| // Stub implementation that only gets DQX to boot. | ||
| class USB_HIDv5 : public USBHost | ||
| { | ||
| public: | ||
| USB_HIDv5(Kernel& ios, const std::string& device_name); | ||
| ~USB_HIDv5() override; | ||
|
|
||
| IPCCommandResult IOCtl(const IOCtlRequest& request) override; | ||
|
|
||
| private: | ||
| static constexpr u32 VERSION = 0x50001; | ||
|
|
||
| u32 m_hanging_request = 0; | ||
| bool m_devicechange_replied = false; | ||
| }; | ||
|
|
||
| } // namespace Device | ||
| } // namespace HLE | ||
| } // namespace IOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.