2014-06-21 23:03:13 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <Xinput.h>
|
|
|
|
|
2016-07-16 20:25:57 +00:00
|
|
|
class XInputManager
|
2014-06-21 23:03:13 +00:00
|
|
|
{
|
|
|
|
private:
|
2015-07-11 01:07:24 +00:00
|
|
|
vector<shared_ptr<XINPUT_STATE>> _gamePadStates;
|
2017-06-04 21:16:57 +00:00
|
|
|
vector<uint8_t> _gamePadConnected;
|
2014-06-21 23:03:13 +00:00
|
|
|
|
|
|
|
public:
|
2016-07-16 20:25:57 +00:00
|
|
|
XInputManager();
|
2014-06-21 23:03:13 +00:00
|
|
|
|
2016-08-30 23:23:49 +00:00
|
|
|
bool NeedToUpdate();
|
2016-07-16 20:25:57 +00:00
|
|
|
void UpdateDeviceList();
|
2015-07-11 01:07:24 +00:00
|
|
|
void RefreshState();
|
2016-02-06 04:49:03 +00:00
|
|
|
bool IsPressed(uint8_t gamepadPort, uint8_t button);
|
2014-06-21 23:03:13 +00:00
|
|
|
};
|