mirror of
https://github.com/libretro/Play-.git
synced 2024-11-28 03:00:49 +00:00
32 lines
624 B
C++
32 lines
624 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include "SifModule.h"
|
|
|
|
class CSifModuleAdapter : public CSifModule
|
|
{
|
|
public:
|
|
typedef std::function<bool(uint32, uint32*, uint32, uint32*, uint32, uint8*)> SifCommandHandler;
|
|
|
|
CSifModuleAdapter()
|
|
{
|
|
}
|
|
|
|
CSifModuleAdapter(const SifCommandHandler& handler)
|
|
: m_handler(handler)
|
|
{
|
|
}
|
|
|
|
virtual ~CSifModuleAdapter()
|
|
{
|
|
}
|
|
|
|
virtual bool Invoke(uint32 method, uint32* args, uint32 argsSize, uint32* ret, uint32 retSize, uint8* ram) override
|
|
{
|
|
return m_handler(method, args, argsSize, ret, retSize, ram);
|
|
}
|
|
|
|
private:
|
|
SifCommandHandler m_handler;
|
|
};
|