mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-26 03:28:02 +02:00
Simple DirectInput support
This commit is contained in:
parent
30acda3005
commit
f273407f97
3 changed files with 212 additions and 0 deletions
35
BeefySysLib/platform/win/DInputManager.h
Normal file
35
BeefySysLib/platform/win/DInputManager.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include "../../BeefySysLib/Common.h"
|
||||
#include "../../BeefySysLib/BFApp.h"
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
|
||||
NS_BF_BEGIN
|
||||
|
||||
class DInputDevice : public BFInputDevice
|
||||
{
|
||||
public:
|
||||
LPDIRECTINPUTDEVICE8 mDirectInputDevice;
|
||||
|
||||
public:
|
||||
~DInputDevice();
|
||||
virtual String GetState() override;
|
||||
};
|
||||
|
||||
class DInputManager
|
||||
{
|
||||
public:
|
||||
LPDIRECTINPUT8 mDirectInput;
|
||||
String mEnumData;
|
||||
|
||||
public:
|
||||
DInputManager();
|
||||
~DInputManager();
|
||||
|
||||
String EnumerateDevices();
|
||||
DInputDevice* CreateInputDevice(const StringImpl& guid);
|
||||
};
|
||||
|
||||
NS_BF_END
|
Loading…
Add table
Add a link
Reference in a new issue