forked from dolphin-emu/dolphin
This changes the IOS code to handle ES contexts inside of ES, instead of leaking out implementation details into the IPC request dispatcher. The intent is to clarify what's shared between every single ES context, and what is specific to an ES context. (Not much.) This should reduce the number of static members in the ES class. The other changes are there just because we now keep track of the IPC FD inside of ES. Future plans: * After the WAD direct launch hack is dropped, the title context will be made a class member. * Have proper function prototypes, instead of having every single one of them take ioctlv requests. This will allow reusing IOS code in other parts of the Dolphin codebase without having to construct ioctlv requests.
39 lines
854 B
C++
39 lines
854 B
C++
// Copyright 2016 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "Core/IOS/DeviceStub.h"
|
|
#include "Common/Logging/Log.h"
|
|
|
|
namespace IOS
|
|
{
|
|
namespace HLE
|
|
{
|
|
namespace Device
|
|
{
|
|
Stub::Stub(u32 device_id, const std::string& device_name) : Device(device_id, device_name)
|
|
{
|
|
}
|
|
|
|
ReturnCode Stub::Open(const OpenRequest& request)
|
|
{
|
|
WARN_LOG(IOS, "%s faking Open()", m_name.c_str());
|
|
m_is_active = true;
|
|
return IPC_SUCCESS;
|
|
}
|
|
|
|
IPCCommandResult Stub::IOCtl(const IOCtlRequest& request)
|
|
{
|
|
WARN_LOG(IOS, "%s faking IOCtl()", m_name.c_str());
|
|
return GetDefaultReply(IPC_SUCCESS);
|
|
}
|
|
|
|
IPCCommandResult Stub::IOCtlV(const IOCtlVRequest& request)
|
|
{
|
|
WARN_LOG(IOS, "%s faking IOCtlV()", m_name.c_str());
|
|
return GetDefaultReply(IPC_SUCCESS);
|
|
}
|
|
} // namespace Device
|
|
} // namespace HLE
|
|
} // namespace IOS
|