From 4a94ec934ab1a2216f94e3fcc46f5dde1d6e2f02 Mon Sep 17 00:00:00 2001 From: Kevin Hartman Date: Wed, 3 Sep 2014 18:12:58 -0700 Subject: Initial HID PAD work, with GLFW only. --- src/common/key_map.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/common/key_map.h (limited to 'src/common/key_map.h') diff --git a/src/common/key_map.h b/src/common/key_map.h new file mode 100644 index 00000000..7e94df61 --- /dev/null +++ b/src/common/key_map.h @@ -0,0 +1,35 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/hid.h" + +namespace KeyMap { + +class CitraKey { +public: + CitraKey() : keyCode(0) {} + CitraKey(int code) : keyCode(code) {} + + int keyCode; + + bool operator < (const CitraKey &other) const { + return keyCode < other.keyCode; + } + + bool operator == (const CitraKey &other) const { + return keyCode == other.keyCode; + } +}; + +struct DefaultKeyMapping { + KeyMap::CitraKey key; + HID_User::PADState state; +}; + +void SetKeyMapping(CitraKey key, HID_User::PADState padState); +HID_User::PADState Get3DSKey(CitraKey key); + +} -- cgit v1.2.3