mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 00:11:17 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
37
src/input/api/DirectInput/DirectInputControllerProvider.h
Normal file
37
src/input/api/DirectInput/DirectInputControllerProvider.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
#if BOOST_OS_WINDOWS
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
#include <dinput.h>
|
||||
|
||||
#include "input/api/ControllerProvider.h"
|
||||
|
||||
#ifndef HAS_DIRECTINPUT
|
||||
#define HAS_DIRECTINPUT 1
|
||||
#endif
|
||||
|
||||
class DirectInputControllerProvider : public ControllerProviderBase
|
||||
{
|
||||
public:
|
||||
DirectInputControllerProvider();
|
||||
~DirectInputControllerProvider() override;
|
||||
|
||||
inline static InputAPI::Type kAPIType = InputAPI::DirectInput;
|
||||
InputAPI::Type api() const override { return kAPIType; }
|
||||
|
||||
std::vector<std::shared_ptr<ControllerBase>> get_controllers() override;
|
||||
|
||||
IDirectInput8* get_dinput() const { return m_dinput8; }
|
||||
LPCDIDATAFORMAT get_data_format() const;
|
||||
|
||||
private:
|
||||
HMODULE m_module = nullptr;
|
||||
|
||||
decltype(&DirectInput8Create) m_DirectInput8Create;
|
||||
decltype(&GetdfDIJoystick) m_GetdfDIJoystick = nullptr;
|
||||
|
||||
IDirectInput8* m_dinput8 = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue