Added the ability to map gamepad buttons to hotkeys.

This commit is contained in:
skidau
2015-01-27 12:24:47 +11:00
parent 7df55d220f
commit 61c04de7ee
14 changed files with 1048 additions and 308 deletions

View File

@ -0,0 +1,41 @@
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include "Core/CoreParameter.h"
#include "InputCommon/InputConfig.h"
struct HotkeyStatus
{
u32 button[6];
s8 err;
};
class HotkeyManager : public ControllerEmu
{
public:
HotkeyManager();
~HotkeyManager();
std::string GetName() const;
void GetInput(HotkeyStatus* const hk);
void LoadDefaults(const ControllerInterface& ciface);
private:
Buttons* m_keys[6];
ControlGroup* m_options;
};
namespace HotkeyManagerEmu
{
void Initialize(void* const hwnd);
void Shutdown();
InputConfig* GetConfig();
void GetStatus(u8 _port, HotkeyStatus* _pKeyboardStatus);
bool IsPressed(int Id, bool held);
static u32 hotkeyDown[6];
}