2006-06-15 04:19:30 +00:00
|
|
|
#ifndef _PH_DIRECTINPUT_H_
|
|
|
|
#define _PH_DIRECTINPUT_H_
|
|
|
|
|
|
|
|
#define DIRECTINPUT_VERSION 0x0800
|
|
|
|
#include <dinput.h>
|
2008-01-24 01:37:47 +00:00
|
|
|
#include "Types.h"
|
2006-07-13 02:44:13 +00:00
|
|
|
#include "../PadHandler.h"
|
2006-06-15 04:19:30 +00:00
|
|
|
|
|
|
|
class CPH_DirectInput : public CPadHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CPH_DirectInput(HWND);
|
2008-01-24 01:37:47 +00:00
|
|
|
virtual ~CPH_DirectInput();
|
2006-06-15 04:19:30 +00:00
|
|
|
void Update();
|
|
|
|
|
2008-01-24 01:37:47 +00:00
|
|
|
static FactoryFunction GetFactoryFunction(HWND);
|
2006-06-15 04:19:30 +00:00
|
|
|
|
|
|
|
private:
|
2008-01-24 01:37:47 +00:00
|
|
|
static CPadHandler* PadHandlerFactory(HWND);
|
2006-06-15 04:19:30 +00:00
|
|
|
void Initialize();
|
|
|
|
bool TranslateKey(uint32, CPadListener::BUTTON*);
|
|
|
|
|
|
|
|
LPDIRECTINPUT8 m_pDI;
|
|
|
|
LPDIRECTINPUTDEVICE8 m_pKeyboard;
|
|
|
|
HWND m_hWnd;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|