mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-27 21:45:16 -06:00
HLE modules now have a unified interface via which they can get notified when mapped into the process or when loaded/unloaded. We also always call the unload functions when stopping emulation to give the module implementations a chance to reset all state (although many of them are still missing proper cleanup code for now)
24 lines
621 B
C++
24 lines
621 B
C++
#pragma once
|
|
|
|
namespace coreinit
|
|
{
|
|
enum class RplEntryReason;
|
|
};
|
|
|
|
// base class for HLE RPL implementations
|
|
class COSModule
|
|
{
|
|
public:
|
|
virtual std::string_view GetName() = 0;
|
|
|
|
virtual std::vector<std::string_view> GetDependencies() { return {}; };
|
|
|
|
virtual void RPLMapped() {}; // RPL mapped into process
|
|
virtual void RPLUnmapped() {}; // RPL unmapped
|
|
|
|
virtual void rpl_entry(uint32 moduleHandle, coreinit::RplEntryReason reason) {};
|
|
// note: to simplify cleanup, both RPLUnmapped() and rpl_entry(unload) are always called even if the process is shutdown via "Close game"
|
|
};
|
|
|
|
std::span<COSModule*> GetCOSModules();
|