mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Added the ability to map gamepad buttons to hotkeys.
This commit is contained in:
41
Source/Core/Core/HotkeyManager.h
Normal file
41
Source/Core/Core/HotkeyManager.h
Normal 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];
|
||||
}
|
Reference in New Issue
Block a user