mirror of
https://github.com/libretro/Play-.git
synced 2025-01-06 00:18:28 +00:00
33 lines
499 B
C++
33 lines
499 B
C++
#include "CommandSink.h"
|
|
|
|
using namespace boost;
|
|
using namespace std;
|
|
|
|
CCommandSink::CCommandSink()
|
|
{
|
|
|
|
}
|
|
|
|
CCommandSink::~CCommandSink()
|
|
{
|
|
|
|
}
|
|
|
|
void CCommandSink::RegisterCallback(HWND hWnd, CallbackType Callback)
|
|
{
|
|
m_Callbacks[hWnd] = Callback;
|
|
}
|
|
|
|
long CCommandSink::OnCommand(unsigned short nId, unsigned short nCmd, HWND hWnd)
|
|
{
|
|
CallbackList::iterator itCallback;
|
|
itCallback = m_Callbacks.find(hWnd);
|
|
|
|
if(itCallback != m_Callbacks.end())
|
|
{
|
|
return (itCallback->second)();
|
|
}
|
|
|
|
return TRUE;
|
|
}
|