mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 13:43:33 +01:00
![Léo Lam](/assets/img/avatar_default.png)
This changes the main IOS code (roughly the equivalent of the kernel) to a class instead of being a set of free functions + tons of static variables. The reason for this change is that keeping tons of static variables like that prevents us from making an IOS instance and reusing IOS code easily. Converting the IOS code to a class also allows us to mostly decouple IOS from the PPC emulation. The more interesting changes are in Core/IOS/IOS. Everything else is mostly just boring stuff required by this change... * Because the devices themselves call back to the main IOS code for various things (getting the current version, replying to a request, and other syscall-like functions), just like processes in IOS call kernel syscalls, we have to pass a reference to the kernel to anything that uses IOS syscalls. * Change DoState to save device names instead of device IDs to simplify AddDevice() and get rid of an ugly static count. * Change ES_Launch's ack to be sent at IOS boot, now that we can do this properly.
31 lines
699 B
C++
31 lines
699 B
C++
// Copyright 2016 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "Core/IOS/Device.h"
|
|
#include "Core/IOS/IOS.h"
|
|
|
|
namespace IOS
|
|
{
|
|
namespace HLE
|
|
{
|
|
namespace Device
|
|
{
|
|
class Stub final : public Device
|
|
{
|
|
public:
|
|
// Inherit the constructor from the Device class, since we don't need to do anything special.
|
|
using Device::Device;
|
|
ReturnCode Open(const OpenRequest& request) override;
|
|
IPCCommandResult IOCtl(const IOCtlRequest& request) override;
|
|
IPCCommandResult IOCtlV(const IOCtlVRequest& request) override;
|
|
};
|
|
} // namespace Device
|
|
} // namespace HLE
|
|
} // namespace IOS
|